// Use this for initialization void Start() { VirtualButtonBehaviour [] vbs = GetComponentsInChildren <VirtualButtonBehaviour> (); for (int i = 0; i < vbs.Length; ++i) { vbs [i].RegisterEventHandler(this); } Hololens.SetActive(false); Enviornment.SetActive(false); videoPanel.SetActive(false); }
public void OnButtonPressed(VirtualButtonBehaviour vb) { switch (vb.VirtualButtonName) { case "Hololens": Hololens.SetActive(true); videoPanel.SetActive(true); Enviornment.SetActive(false); break; case "Effects": Hololens.SetActive(false); videoPanel.SetActive(false); Enviornment.SetActive(true); break; } }