protected void Awake() { if (CheckStatus()) // Check if the system is enabled { if (!CoreBehaviour.AddManager(this)) // Catch failure to add manager { Debug.LogError("Unable to add manager " + GetType()); } } // Continue calls to derived object PostAwake(); }
/// <summary> /// Initialize the manager. /// </summary> /// <returns> Whether the manager was initialized successfully. </returns> public bool Initialize() { if (CheckStatus()) // Check if the system is enabled { if (CoreBehaviour.AddManager(this)) // Ensure the manager was added { return(true); } else // Catch failure to add manager { Debug.LogError("Unable to add manager " + GetType()); } } return(false); }