Created
October 23, 2018 23:41
-
-
Save rngtm/63ebb4bf87b9df911bf5529874966c70 to your computer and use it in GitHub Desktop.
シェーダーグラフファイルを作成するウィンドウ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using UnityEditor; | |
| public class ShaderGraphGegneratorWindow : EditorWindow | |
| { | |
| GUIStyle m_ButtonStyle; | |
| [MenuItem("Tools/ShaderGraph Generator")] | |
| static void Open() | |
| { | |
| GetWindow<ShaderGraphGegneratorWindow>("ShaderGraph Generator"); | |
| } | |
| void OnGUI() | |
| { | |
| if (m_ButtonStyle == null) | |
| { | |
| m_ButtonStyle = new GUIStyle(GUI.skin.button); | |
| m_ButtonStyle.wordWrap = true; | |
| } | |
| if (GUILayout.Button("Generate PBR Graph", m_ButtonStyle)) | |
| { | |
| EditorApplication.ExecuteMenuItem("Assets/Create/Shader/PBR Graph"); | |
| } | |
| if (GUILayout.Button("Generate Unlit Graph", m_ButtonStyle)) | |
| { | |
| EditorApplication.ExecuteMenuItem("Assets/Create/Shader/Unlit Graph"); | |
| } | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
使い方
