Fix AR State
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user