void Awake() { if (AGENT_DATABASE == null) { AGENT_DATABASE = FindObjectOfType <AgentDatabase>(); } }
void Awake() { m_ID = transform.gameObject.GetInstanceID(); if (AGENT_DB == null) { AGENT_DB = FindObjectOfType <AgentDatabase>(); } }
void Awake() { if (smoothing) { // If smoother attached then use that. m_Smoother = GetComponent <Smoother> (); // Else add smoother componenet. if (!m_Smoother) { m_Smoother = gameObject.AddComponent <Smoother> (); } } if (AGENT_DB == null) { AGENT_DB = FindObjectOfType <AgentDatabase> (); } }