Add AR SCript demo
This commit is contained in:
17
vr-configurator/Assets/Scripts/UI/ARToggleButton.cs
Normal file
17
vr-configurator/Assets/Scripts/UI/ARToggleButton.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UI
|
||||
{
|
||||
public class ARToggleButton: MonoBehaviour
|
||||
{
|
||||
public OVRPassthroughLayer passthroughLayer;
|
||||
private bool _isPassthroughOn = true;
|
||||
|
||||
public void TogglePassthrough()
|
||||
{
|
||||
_isPassthroughOn = !_isPassthroughOn;
|
||||
passthroughLayer.enabled = _isPassthroughOn;
|
||||
Debug.Log("Passthrough is now: " + _isPassthroughOn);
|
||||
}
|
||||
}
|
||||
}
|
||||
3
vr-configurator/Assets/Scripts/UI/ARToggleButton.cs.meta
Normal file
3
vr-configurator/Assets/Scripts/UI/ARToggleButton.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b59dae33d214a62aa135792503fcac9
|
||||
timeCreated: 1751030528
|
||||
Reference in New Issue
Block a user