public override void OnInspectorGUI() { if (boxStyle == null) { boxStyle = GUI.skin.FindStyle("box"); } EditorGUILayout.Separator(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Particle Playground v" + PlaygroundC.version.ToString(), EditorStyles.largeLabel, GUILayout.Height(20)); EditorGUILayout.Separator(); if (GUILayout.Button("Open Playground Wizard", EditorStyles.toolbarButton, GUILayout.Width(130))) { PlaygroundParticleWindowC.ShowWindow(); } EditorGUILayout.EndHorizontal(); EditorGUILayout.Separator(); RenderPlaygroundSettings(); if (Event.current.type == EventType.ValidateCommand && Event.current.commandName == "UndoRedoPerformed") { foreach (PlaygroundParticlesC p in playgroundScriptReference.particleSystems) { p.Start(); } } }
public static void ShowWindow() { PlaygroundParticleWindowC window = GetWindow <PlaygroundParticleWindowC>(); window.title = "Playground"; window.Show(); }