//------------------------------------------------- void Awake() { _instance = this; if (firstTimeAwake) { firstTimeAwake = false; } else { /** * If the game is started in the Playing scene, asume we are testing and just load level 0 **/ if (SceneManager.GetActiveScene().name == "Playing") { usedCamera = GameObject.Find("ARCamera").GetComponent <Camera>(); print("used camera set :" + usedCamera); if (Application.platform != RuntimePlatform.Android) { isInFallBack = true; if (gameStateManager.getGlobalStateIndex() == GameStateManager.STATE_PLAYING) { GameObject.Find("ARCamera").SetActive(false); GameObject.Find("ImageTarget").SetActive(false); foreach (Camera cam in Resources.FindObjectsOfTypeAll(typeof(Camera))) { if (cam.name == "FallbackCamera") { cam.gameObject.SetActive(true); usedCamera = cam; } } } } else { GameObject.Find("MoveButtons").SetActive(false); } } } }
void Start() { fallbackManagerScript = Object.FindObjectOfType <FallbackManagerScript>(); }
//------------------------------------------------- void Awake() { _instance = this; }