public static void ShowWindow()
 {
     instance = (PathManagerWindow)GetWindow(typeof(PathManagerWindow));
     instance.titleContent = new GUIContent("Editor");
     instance.minSize      = new Vector2(360, 70);
     instance.maxSize      = new Vector2(360, 70);
     instance._state       = 0;
 }
Esempio n. 2
0
        private void OnEnable()
        {
            first = true;

            _target = target as BezierPath;

            _target.gameObject.SetActive(true);

            PathManagerWindow._Path = _target;
            _target.CameraFollowing = true;
            _target.CameraMode      = PathManagerWindow.GetCamera();

            _target.nodeChange = true;

            _target._ctrlPoint = new List <BezierPoint>();

            InitBezier();
            EditorApplication.update += Check;
        }
        private void Update()
        {
            if (instance == null)
            {
                instance = (PathManagerWindow)GetWindow(typeof(PathManagerWindow));
            }

            if (_state != 0 && _Path == null)
            {
                _state           = 0;
                instance.minSize = new Vector2(360, 148);
                instance.maxSize = new Vector2(360, 148);
                Repaint();
            }
            else if (_Path != null && Selection.activeGameObject == _Path.gameObject && _state != 1)
            {
                _state           = 1;
                instance.minSize = new Vector2(360, 400);
                instance.maxSize = new Vector2(360, 400);
                Repaint();
            }
        }
 public static void ShowEditorWindow()
 {
     PathManagerWindow.ShowWindow();
 }