Exemple #1
0
        protected virtual void OnSceneGUI()
        {
            if (m_splineBaseEditor == null)
            {
                m_splineBaseEditor = SplineBaseEditorImpl.Instance;
                m_splineBaseEditor.Enable(Selection.objects, Selection.activeObject);
            }

            if (EditorWindow.focusedWindow == SceneView.lastActiveSceneView)
            {
                if (Event.current.rawType == EventType.MouseUp || Event.current.type == EventType.MouseDown)
                {
                    m_splineBaseEditor.SyncCtrlPoints();
                }
            }
            else
            {
                m_splineBaseEditor.SyncCtrlPoints();
            }

            ControlPoint point = (ControlPoint)target;

            if (Selection.activeObject == point.gameObject)
            {
                m_splineBaseEditor.SceneGUI();
            }
        }
 protected virtual void OnEnable()
 {
     SceneGLCamera.Enable();
     if (m_splineBaseEditor != null)
     {
         m_splineBaseEditor.Enable(Selection.objects, Selection.activeObject);
     }
 }
Exemple #3
0
        protected virtual void OnEnable()
        {
            SceneGLCamera.Enable();

            if (m_splineBaseEditor != null)
            {
                m_splineBaseEditor.Enable(Selection.objects, Selection.activeObject);
            }

            Undo.undoRedoPerformed += OnUndoPerformed;
        }
        protected virtual void OnSceneGUI()
        {
            if (m_splineBaseEditor == null)
            {
                m_splineBaseEditor = SplineBaseEditorImpl.Instance;
                m_splineBaseEditor.Enable(Selection.objects, Selection.activeObject);
            }
            JunctionBase junction = (JunctionBase)target;

            if (Selection.activeObject == junction.gameObject)
            {
                m_splineBaseEditor.SceneGUI();
            }
        }
        protected virtual void OnSceneGUI()
        {
            if (m_splineBaseEditor == null)
            {
                m_splineBaseEditor = SplineBaseEditorImpl.Instance;
                m_splineBaseEditor.Enable(Selection.objects, Selection.activeObject);
            }

            SplinePointBase point = (SplinePointBase)target;

            if (Selection.activeObject == point.gameObject)
            {
                SplineBaseEditorImpl.Instance.SceneGUI();
            }
        }
        protected virtual void OnEnable()
        {
            m_pointDataProp  = serializedObject.FindProperty("m_data");
            m_junctionProp   = m_pointDataProp.FindPropertyRelative("Junction");
            m_twistProp      = m_pointDataProp.FindPropertyRelative("Twist");
            m_twistAngleProp = m_twistProp.FindPropertyRelative("Angle");
            m_twistT0Prop    = m_twistProp.FindPropertyRelative("T0");
            m_twistT1Prop    = m_twistProp.FindPropertyRelative("T1");

            SceneGLCamera.Enable();
            if (m_splineBaseEditor != null)
            {
                m_splineBaseEditor.Enable(Selection.objects, Selection.activeObject);
            }
        }
        protected virtual void OnEnable()
        {
            SceneGLCamera.Enable();
            if (m_splineBaseEditor != null)
            {
                m_splineBaseEditor.Enable(Selection.objects, Selection.activeObject);
            }

            m_junctions = new JunctionBase[targets.Length];
            for (int i = 0; i < m_junctions.Length; ++i)
            {
                m_junctions[i] = (JunctionBase)targets[i];
                m_junctions[i].Select();
            }
        }