Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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");
- }
- }
- }
Add Comment
Please, Sign In to add comment