Files
Test/Library/PackageCache/com.unity.render-pipelines.universal@ffe395a3a1d1/Runtime/2D/Sources/Shadow2DSource_ShapeEditor.cs
T
2026-11-01 23:39:55 +02:00

33 lines
908 B
C#

#if UNITY_EDITOR
using System;
using UnityEditor;
namespace UnityEngine.Rendering.Universal
{
[Serializable]
internal class Shadow2DSource_ShapeEditor : SelectionSource
{
public Shadow2DSource_ShapeEditor(GUIContent menuName, int priority)
{
m_MenuName = menuName;
m_MenuPriority = priority;
}
public override int GetHashCode()
{
return (int)ShadowCaster2D.ShadowCastingSources.ShapeEditor;
}
public override void SetSourceType(SerializedObject serializedObject)
{
serializedObject.Update();
SerializedProperty shadowCastingSource = serializedObject.FindProperty("m_ShadowCastingSource");
shadowCastingSource.intValue = (int)ShadowCaster2D.ShadowCastingSources.ShapeEditor;
serializedObject.ApplyModifiedProperties();
}
}
}
#endif