/// <summary> /// Update this instance. /// </summary> private void Update() { if(GameObject.FindGameObjectWithTag("MainObject") != null ) { movieTimer += Time.deltaTime; } if(movieTimer >= MovieTimeLength && GameObject.FindGameObjectWithTag("MainObject") != null) { UnityEngine.Debug.Log(" currently movieTimer is UP"); checker = true; MainObject = GameObject.FindGameObjectWithTag("MainObject"); MainObject.GetComponent<AudioSource>().enabled = true; localGameStateManagerRef = MainObject.GetComponent<GameStateManager>(); localGameStateManagerRef.EnterMainMenu(); GameObject.FindGameObjectWithTag("MainObject").GetComponent<GameStateManager>().ForceOnlyOneIntro = true; } else { try { MainObject = GameObject.FindGameObjectWithTag("MainObject"); MainObject.GetComponent<AudioSource>().enabled = false; localGameStateManagerRef = MainObject.GetComponent<GameStateManager>(); } catch { } } }