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(); }
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(); } }
void AddFader() { FaderList.arraySize++; FaderList.serializedObject.ApplyModifiedProperties(); TPFaderDesigner.UpdateManager(); }