Exemplo n.º 1
0
		void OnEnable()
		{
			if (m_cNavMono == null)
			{
				if (target)
				{
					m_cNavMono = (NavMonoEditor)target;
				}
				else
					Debug.Log("需要一个脚本对象,必须挂载脚本上面");
			}
			if( m_cParent == null )
			{
				GameObject.DestroyImmediate(GameObject.Find("NavMeshParent"));
				m_cParent = new GameObject("NavMeshParent");
				m_cParent.transform.parent = this.m_cNavMono.transform;
			}
		}
Exemplo n.º 2
0
 void OnEnable()
 {
     if (m_cNavMono == null)
     {
         if (target)
         {
             m_cNavMono = (NavMonoEditor)target;
         }
         else
         {
             Debug.Log("需要一个脚本对象,必须挂载脚本上面");
         }
     }
     if (m_cParent == null)
     {
         GameObject.DestroyImmediate(GameObject.Find("NavMeshParent"));
         m_cParent = new GameObject("NavMeshParent");
         m_cParent.transform.parent = this.m_cNavMono.transform;
     }
 }
Exemplo n.º 3
0
 void OnDestroy()
 {
     this.m_cNavMono = null;
 }
Exemplo n.º 4
0
		void OnDestroy()
		{
			this.m_cNavMono = null;
		}