Fix AR State

This commit is contained in:
FlorianSpeicher
2025-07-08 00:00:32 +02:00
parent 4fe25dc510
commit 77f2d5d8e1

View File

@@ -12,7 +12,7 @@ namespace UI
void Start() void Start()
{ {
gameObject.GetComponent<Button>().onClick.AddListener(TogglePassthrough); gameObject.GetComponent<Button>().onClick.AddListener(TogglePassthrough);
passthroughLayer.enabled = true; passthroughLayer.enabled = false;
} }
public void TogglePassthrough() public void TogglePassthrough()
@@ -24,6 +24,7 @@ namespace UI
return; return;
} }
passthroughLayer.enabled = !passthroughLayer.enabled; passthroughLayer.enabled = !passthroughLayer.enabled;
passthroughLayer.gameObject.SetActive(passthroughLayer.enabled);
raceTrack.SetActive(!passthroughLayer.enabled); raceTrack.SetActive(!passthroughLayer.enabled);
Debug.Log("Passthrough is now: " + passthroughLayer.enabled); Debug.Log("Passthrough is now: " + passthroughLayer.enabled);
pressed = false; pressed = false;