Exemplo n.º 1
0
        /// <summary>
        /// ヘッダ描画
        /// </summary>
        private void DrawHeader()
        {
            using (new EditorGUILayout.HorizontalScope(EditorStyles.toolbar))
            {
                if (GUILayout.Button("Open Attacher", EditorStyles.toolbarButton))
                {
                    MaterialPresetAttachWindow.Open();
                }

                GUILayout.FlexibleSpace();

                if (GUILayout.Button("Config", EditorStyles.toolbarButton))
                {
                    // EditorGUIUtility.PingObject(toolConfig);
                    Selection.activeObject = toolConfig;
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// ウィンドウ描画
        /// </summary>
        private void OnGUI()
        {
            using (new EditorGUILayout.VerticalScope(GUI.skin.box))
            {
                EditorGUILayout.LabelField("■ Create");
                DrawCreateButton();
            }

            // プリセット系ツール
            using (new EditorGUILayout.VerticalScope(GUI.skin.box))
            {
                EditorGUILayout.LabelField("■ Presets");

                if (GUILayout.Button(VfxMenuConfig.MaterialPresetGeneratorButtonName))
                {
                    MaterialPresetGeneratorWindow.Open();
                }

                if (GUILayout.Button(VfxMenuConfig.MaterialPresetAttacherButtonName))
                {
                    MaterialPresetAttachWindow.Open();
                }
            }

            using (new EditorGUILayout.VerticalScope(GUI.skin.box))
            {
                EditorGUILayout.LabelField("■ Editor");

                if (GUILayout.Button(VfxMenuConfig.TimeChangerButtonName))
                {
                    ShurikenTimeChangerWindow.Open();
                }

                if (GUILayout.Button(VfxMenuConfig.RandomizerButtonName))
                {
                    ShurikenRandomizeWindow.Open();
                }

                if (GUILayout.Button(VfxMenuConfig.ShurikenColorChangeButtonName))
                {
                    ShurikenColorChangeWindow.Open();
                }
            }

            using (new EditorGUILayout.VerticalScope(GUI.skin.box))
            {
                EditorGUILayout.LabelField("■ Loop");
                if (GUILayout.Button(VfxMenuConfig.LoopButtonName))
                {
                    foreach (var ps in ParticleSystemUtility.GetSelectionParticleSystemRecursive())
                    {
                        var main = ps.main;
                        main.loop = true;
                    }
                }

                if (GUILayout.Button(VfxMenuConfig.UnloopButtonName))
                {
                    foreach (var ps in ParticleSystemUtility.GetSelectionParticleSystemRecursive())
                    {
                        var main = ps.main;
                        main.loop = false;
                    }
                }
            }


            using (new EditorGUILayout.VerticalScope(GUI.skin.box))
            {
                EditorGUILayout.LabelField("■ Copy/Paste");
                if (GUILayout.Button(VfxMenuConfig.CopyPasteButtonName))
                {
                    ShurikenCopyPasteWindow.Open();
                }
            }

            using (new EditorGUILayout.VerticalScope(GUI.skin.box))
            {
                EditorGUILayout.LabelField("■ Viewer");
                if (GUILayout.Button(VfxMenuConfig.ShurikenViewerButtonName))
                {
                    ShurikenViewerWindow.Open();
                }
            }
        }