Exemple #1
0
 void OnEnable()
 {
     SceneView.onSceneGUIDelegate += OnSceneGUI;
     _window         = this;
     _previousTool   = Tools.current;
     _window.minSize = new Vector2(400, 675);
 }
Exemple #2
0
        [MenuItem("Window/Set Pivot")]     //Place the Set Pivot menu item in the GameObject menu
        static void Init()
        {
            _window = GetWindow <SetPivotWindow>();

#if !UNITY_5
            _window.title = "Set Pivot";
#endif
#if UNITY_5
            _window.titleContent = new GUIContent("Set Pivot");
#endif
            _window.Show();
            _window.SelectionChanged();
        }