public void OnEnable ()
		{
			#if UNITY_EDITOR
			//adding delegates
			UnityEditor.EditorApplication.update -= Update;	

			if (isEditor) 
				UnityEditor.EditorApplication.update += Update;	
			#endif

			//finding singleton instance
			instance = FindObjectOfType<MapMagic>();

			//checking terrains consistency
			terrains.CheckEmpty();
		}
Exemple #2
0
		public void OnEnable ()
		{
			#if UNITY_EDITOR
			//adding delegates
			UnityEditor.EditorApplication.update -= Update;	
			//UnityEditor.SceneView.onSceneGUIDelegate -= GetEditorCamPos; 
			
			if (isEditor) 
			{
				//UnityEditor.SceneView.onSceneGUIDelegate += GetEditorCamPos;
				UnityEditor.EditorApplication.update += Update;	
			}
			#endif

			//finding singleton instance
			instance = FindObjectOfType<MapMagic>();

			//checking terrains consistency
			terrains.CheckEmpty();
		}