void Awake() { if (_ins == null) { // Populate with first instance _ins = this; } else { // Another instance exists, destroy if (this != _ins) Destroy(this.gameObject); } }
void Start() { if (gameCam == null) { Debug.LogError("GVGameView: No game camera referenced. Defaulting to main."); gameCam = Camera.main; } gvManager = GVManager.ins; if (gvManager == null) { Debug.LogError("No GVManager?!"); } GVViewport _vp = gvManager.GetComponent<GVViewport>(); if (_vp == null) { Debug.LogError("No GVViewport on GVManager."); } else { _vp.Init(gameCam); } }
void Start () { if (title == null) { Debug.LogError("No title text object referenced"); } if (subject == null) { Debug.LogError("No subject text object referenced"); } if (explaination == null) { Debug.LogError("No explaination text object referenced"); } if (codeDesc == null) { Debug.LogError("No codeDesc object referenced"); } if (descBulletPoint == null) { Debug.LogError("No descBulletPoint prefab referenced"); } if (examples == null) { Debug.LogError("No examples object referenced"); } if (codeField == null) { Debug.LogError("No codeField object referenced"); } if (instructions == null) { Debug.LogError("No instructions object referenced"); } if (courseViewDropdown == null) { Debug.LogError("No courseViewDropdown referenced"); } if (gvControls == null) { Debug.LogError("No gvControls referenced"); } // Modal panel modalPanel = ModalPanel.ins; if (modalPanel == null) { Debug.LogError("No modal panel?"); } yesResetCode = new UnityAction(_ResetCode); noResetCode = new UnityAction(_DoNothing); yesShowSolution = new UnityAction(_ShowSolution); noShowSolution = new UnityAction(_DoNothing); // Course manager courseManager = CourseManager.ins; if (courseManager == null) { Debug.LogError("No CourseManager?"); } //GameView manager gvManager = GVManager.ins; if (gvManager == null) { Debug.LogError("No GVManager?"); } //CodeEnvironment manager ceManager = CEManager.ins; if (ceManager == null) { Debug.LogError("No CEManager?"); } }