Exemplo n.º 1
0
 /// <summary>
 /// This is like the Release but done by the MonoBehaviour
 /// </summary>
 private void OnDestroy()
 {
     if (m_Instance == this)
         m_Instance = null;
 }
Exemplo n.º 2
0
 /// <summary>
 /// This is like the Init but done by the MonoBehaviour
 /// </summary>
 private void Awake()
 {
     if (m_Instance == null)
         m_Instance = this;
     else
     {
         Debug.LogError("Someone is trying to create various NavigationPathfinder [" + name + "]");
         this.enabled = false;
     }
 }