Esempio n. 1
0
        public override void OnInspectorGUI()
        {
            if (!inited)
            {
                (target as MacroSequence).Init();
                inited = true;
            }

            this.DrawDefaultInspector();
            if (GUILayout.Button("Open editor"))
            {
                if (editor == null)
                {
                    editor = EditorWindow.GetWindow <SequenceWindow>();

                    editor.Sequence = (target as MacroSequence).Sequence;
                }
            }
            if (GUILayout.Button("Close editor"))
            {
                if (editor != null)
                {
                    editor.Close();
                }
            }
        }
        public override void OnInspectorGUI()
        {
            if (GUILayout.Button("Open editor"))
            {
                if (editor == null)
                {
                    editor          = EditorWindow.GetWindow <SequenceWindow>();
                    editor.Sequence = (target as Sequence);
                }
            }
            if (GUILayout.Button("Close editor"))
            {
                if (editor != null)
                {
                    editor.Close();

                    AssetDatabase.SaveAssets();
                }
            }

            DrawDefaultInspector();
        }