public override void Init() { // Tag management CreateTags(); // KinectSystem KinectSystem = GameObject.Find("KinectSystem") as GameObject; KinectSystem.SetActive(false); // GUI GUI_Desktop = GameObject.Find("GUI_Desktop") as GameObject; GUI_Kinect = GameObject.Find("GUI_Kinect") as GameObject; GameObject GUI_Kinect_Button = GameObject.Find("GUI_Kinect_Button") as GameObject; GameObject GUI_Help_Screen = GameObject.Find("GUI_Help_Screen") as GameObject; GameObject GUI_Ficha = GameObject.Find("GUI_Ficha") as GameObject; GameObject GUI_Launcher = GameObject.Find("GUI_Launcher") as GameObject; GameObject GUI_Monotouch = GameObject.Find("GUI_Monotouch") as GameObject; GameObject GUI_OVR = GameObject.Find("GUI_OVR") as GameObject; GUI_Desktop.SetActive(false); GUI_Kinect.SetActive(false); GUI_Kinect_Button.SetActive(false); GUI_Help_Screen.SetActive(false); GUI_Ficha.SetActive(false); GUI_Monotouch.SetActive(false); GUI_OVR.SetActive(false); if (showLoading == false) { GUI_Launcher.SetActive(false); } switch (buildType) { case BuildType.Desktop: GUI_Desktop.SetActive(true); break; case BuildType.Kinect: GUI_Desktop.SetActive(true); KinectSystem.SetActive(true); kinectManager = KinectSystem.GetComponent <KinectManager>(); kinectManager.DisableKinect(); GUI_Kinect_Button.SetActive(true); break; case BuildType.Monotouch: GUI_Monotouch.SetActive(true); break; case BuildType.OVR: GUI_OVR.SetActive(true); break; } }
public void ActivateKinect(bool activate) { if (activate) { GUI_Desktop.SetActive(false); GUI_Kinect.SetActive(true); kinectManager.ActivateKinect(); } else { GUI_Desktop.SetActive(true); GUI_Kinect.SetActive(false); kinectManager.DisableKinect(); } }