コード例 #1
0
        public static void OpenWindow()
        {
            if (EditorApplication.isPlaying)
            {
                Debug.Log("You can't change Fader Designer runtime!");
                return;
            }
            currentScene = EditorSceneManager.GetActiveScene().name;
            EditorApplication.hierarchyWindowChanged += hierarchyWindowChanged;

            window = (TPFaderDesigner)GetWindow(typeof(TPFaderDesigner));
            window.autoRepaintOnSceneChange = true;
            window.minSize = new Vector2(615, 290);
            window.maxSize = new Vector2(615, 290);
            window.Show();
        }
コード例 #2
0
        public void OpenCreator()
        {
            if (TPFaderCreator.DebugMode)
            {
                if (serializedObject.targetObject.hideFlags != HideFlags.NotEditable)
                {
                    serializedObject.targetObject.hideFlags = HideFlags.NotEditable;
                }
                return;
            }

            if (serializedObject.targetObject.hideFlags != HideFlags.None)
            {
                serializedObject.targetObject.hideFlags = HideFlags.None;
            }

            if (GUILayout.Button("Open Fader Manager", GUILayout.Height(30)))
            {
                TPFaderDesigner.OpenWindow();
            }
        }
コード例 #3
0
 void AddFader()
 {
     FaderList.arraySize++;
     FaderList.serializedObject.ApplyModifiedProperties();
     TPFaderDesigner.UpdateManager();
 }