37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
using Misaki.ShaderGUI;
|
|
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
namespace Misaki.HdrpToon.Editor
|
|
{
|
|
public class UTSShaderGUI : ScopedShaderGUI
|
|
{
|
|
private GUIStyle _headerStyle;
|
|
|
|
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
|
|
{
|
|
if (!initialized)
|
|
{
|
|
OnInitialize(materialEditor, properties);
|
|
}
|
|
|
|
EditorGUILayout.Space(10);
|
|
EditorGUILayout.LabelField("HDRP Toon Shader", _headerStyle);
|
|
EditorGUILayout.Space(20);
|
|
|
|
DrawShaderGUI(properties);
|
|
}
|
|
|
|
private void OnInitialize(MaterialEditor materialEditor, MaterialProperty[] properties)
|
|
{
|
|
AddUIScope(new SurfaceOptionsScope());
|
|
AddUIScope(new AngelRingScope());
|
|
AddUIScope(new OutlineScope());
|
|
|
|
Initialize(materialEditor, properties);
|
|
|
|
_headerStyle = new GUIStyle() { fontSize = 25, fontStyle = FontStyle.Bold, alignment = TextAnchor.MiddleCenter };
|
|
_headerStyle.normal.textColor = GUI.skin.label.normal.textColor;
|
|
}
|
|
}
|
|
} |