23 lines
586 B
C#
23 lines
586 B
C#
using System;
|
|
using UnityEngine;
|
|
using UnityEditor;
|
|
|
|
namespace BFEditor.Resource
|
|
{
|
|
public class UIOutlineGUI : ShaderGUI
|
|
{
|
|
Color color;
|
|
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
|
|
{
|
|
Material mat = materialEditor.target as Material;
|
|
EditorGUI.BeginChangeCheck();
|
|
color = mat.GetColor("_OutlineColor");
|
|
color = EditorGUILayout.ColorField("Outline Color", color);
|
|
if (EditorGUI.EndChangeCheck())
|
|
{
|
|
mat.SetColor("_OutlineColor", color);
|
|
}
|
|
}
|
|
}
|
|
}
|