Initial Commit

This commit is contained in:
2025-07-04 20:33:06 +03:00
commit 8f09347ae0
9219 changed files with 2447903 additions and 0 deletions
@@ -0,0 +1,35 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class OverlayPassthrough : MonoBehaviour
{
OVRPassthroughLayer passthroughLayer;
void Start()
{
GameObject ovrCameraRig = GameObject.Find("OVRCameraRig");
if (ovrCameraRig == null)
{
Debug.LogError("Scene does not contain an OVRCameraRig");
return;
}
passthroughLayer = ovrCameraRig.GetComponent<OVRPassthroughLayer>();
if (passthroughLayer == null)
{
Debug.LogError("OVRCameraRig does not contain an OVRPassthroughLayer component");
}
}
void Update()
{
if (OVRInput.GetDown(OVRInput.Button.One, OVRInput.Controller.RTouch))
{
passthroughLayer.hidden = !passthroughLayer.hidden;
}
float thumbstickX = OVRInput.Get(OVRInput.Axis2D.PrimaryThumbstick, OVRInput.Controller.RTouch).x;
passthroughLayer.textureOpacity = thumbstickX * 0.5f + 0.5f;
}
}