Rasagar/Library/PackageCache/com.unity.visualeffectgraph/Samples~/VFXOutputEventHandlers/Editor/VFXOutputEventUnityEventEditor.cs

29 lines
901 B
C#
Raw Normal View History

2024-08-26 13:07:20 -07:00
using UnityEngine;
using UnityEngine.VFX.Utility;
namespace UnityEditor.VFX.Utility
{
[CustomEditor(typeof(VFXOutputEventUnityEvent))]
class VFXOutputEventUnityEventEditor : VFXOutputEventHandlerEditor
{
SerializedProperty m_OnEvent;
protected override void OnEnable()
{
base.OnEnable();
m_OnEvent = serializedObject.FindProperty(nameof(VFXOutputEventUnityEvent.onEvent));
}
public override void OnInspectorGUI()
{
serializedObject.Update();
EditorGUI.BeginChangeCheck();
DrawOutputEventProperties();
EditorGUILayout.PropertyField(m_OnEvent);
HelpBox("Attribute Usage", "VFX Attributes are not used for this Output Event Handler");
if (EditorGUI.EndChangeCheck())
serializedObject.ApplyModifiedProperties();
}
}
}