//---[View shift]-----------------------------------------------------------------------------------------------/

        public void Initialize(SerializedProperty serializedProperty)
        {
            if (this.serializedProperty != null)
            {
                this.serializedProperty = null;
                graphView.Unload();
            }

            this.serializedProperty = serializedProperty;

            graphView.Load(serializedProperty.Copy());
            hasBeenFramed = false;
        }
Example #2
0
        //---[View shift]-----------------------------------------------------------------------------------------------/

        void OnSelectionChange()
        {
            if (Selection.activeGameObject == null || !Selection.activeGameObject.TryGetComponent <Sequencer>(out var sequencer))
            {
                return;
            }

            if (activeSequencer != null)
            {
                serializedObject = null;
                activeSequencer  = null;

                graphView.Unload();
            }

            activeSequencer  = sequencer;
            serializedObject = new SerializedObject(activeSequencer);

            graphView.Load(activeSequencer, serializedObject);
            hasBeenFramed = false;
        }