Ejemplo n.º 1
0
	public void EditorUpdate ()
	{
		if (script==null) return; //in case of re-assigning missing script
		
		//finding terrain
		if (script.terrain==null) 
			try { script.terrain = script.GetComponent<Terrain>(); }
			catch (Exception e) { UnityEditor.EditorApplication.update -= EditorUpdate; e.GetType(); } //get type to disable warinng 'never used'
		if (script.terrain==null) return;
		
		RefreshTerrainGui();
	}