UniVRM/Assets/VRM10_Samples/MToon10Showcase/Editor/CustomEditor/RimLightingEntryDrawer.cs

20 lines
749 B
C#

using UnityEditor;
using UnityEngine;
namespace VRM10.Samples.MToon10Showcase
{
[CustomPropertyDrawer(typeof(RimLightingShowcase.RimLightingMixFactorEntry))]
public sealed class RimLightingEntryDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
EditorGUILayout.PropertyField(
property.FindPropertyRelative(
nameof(RimLightingShowcase.RimLightingMixFactorEntry.rimMultiplyTexture)));
EditorGUILayout.Slider(
property.FindPropertyRelative(
nameof(RimLightingShowcase.RimLightingMixFactorEntry.rimLightingMixFactor)),
0, 1);
}
}
}