Esempio n. 1
0
        private void onSceneChange(Scene scene, Scene scene2)
        {
            bool containsLeia;

            GameObject[] gameObjects = scene2.GetRootGameObjects();
            LeiaDisplay  leiaDisp    = null;

            for (int i = 0; i < gameObjects.Length; i++)
            {
                leiaDisp = gameObjects[i].GetComponent <LeiaDisplay>();
                if (leiaDisp != null)
                {
                    break;
                }
            }
            containsLeia = (leiaDisp != null);

            if (!containsLeia)
            {
                LeiaDevice.SetBacklightMode(2, 1);
            }
            if (detachCallbackForSceneChange)
            {
                SceneManager.activeSceneChanged -= onSceneChange;
            }

            if (detachCallbackForSceneChange)
            {
                SceneManager.activeSceneChanged -= onSceneChange;
            }
        }
Esempio n. 2
0
 public bool IsConnected()
 {
     return(LeiaDevice.IsConnected());
 }