/// <summary> /// Acquires the AI manager. /// </summary> private void AcquireAIManager() { GameObject ManagerGameObject = GameObject.FindGameObjectWithTag("AI Manager"); if(!ManagerGameObject) { UnityDebug.LogError(@"GameObject tagged as 'AI Manager' Not found in scene"); } else { Manager = ManagerGameObject.GetComponent<AIManager>() as AIManager; if(!Manager) { UnityDebug.LogError(@"GameObject tagged as 'AI Manager' found. But it is missing the AIManager component"); } } }
private void Awake() { current = this; }