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; } }
public bool IsConnected() { return(LeiaDevice.IsConnected()); }