Пример #1
0
        static SceneNavigator()
        {
            // Set up callbacks.
            EditorApplication.playmodeStateChanged += PlaymodeStateChanged;
            SceneView.onSceneGUIDelegate           += OnSceneGUI;

            // Setup Texture
            _zoomInTexture  = (Texture)UnityEditor.AssetDatabase.LoadAssetAtPath("Assets/Digicrafts/SceneNavigator/Editor/images/SceneNavigator_Zoom_In.png", typeof(Texture));
            _zoomOutTexture = (Texture)UnityEditor.AssetDatabase.LoadAssetAtPath("Assets/Digicrafts/SceneNavigator/Editor/images/SceneNavigator_Zoom_Out.png", typeof(Texture));
            _centerTexture  = (Texture)UnityEditor.AssetDatabase.LoadAssetAtPath("Assets/Digicrafts/SceneNavigator/Editor/images/SceneNavigator_Center.png", typeof(Texture));

            // Initialize.
            SceneNavigatorSettings.Read();
            InitCameraRig();
            StoreSelectionTransforms();
        }
 public void Dispose()
 {
     SceneNavigatorSettings.Write();
 }
 public void OnGUI()
 {
     SceneNavigatorSettings.OnGUI();
 }
        public void OnDestroy()
        {
//			Debug.Log("On destroy");
            SceneNavigatorSettings.Write();
        }
        public void OnDisable()
        {
//			Debug.Log("On disable");
            SceneNavigatorSettings.Write();
        }