Skip to content
This repository was archived by the owner on May 9, 2025. It is now read-only.

Commit 3c2fdf5

Browse files
Fixed game events not using the new editor drawing system
1 parent b88c429 commit 3c2fdf5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Assets/SO Architecture/Editor/Inspectors/TypedGameEventEditor.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ protected override void DrawRaiseButton()
2222

2323
using (var scope = new EditorGUI.ChangeCheckScope())
2424
{
25-
EditorGUILayout.PropertyField(property);
25+
Type debugValueType = GetDebugValueType(property);
26+
//EditorGUILayout.PropertyField(property);
27+
GenericPropertyDrawer.DrawPropertyDrawerLayoutNew(property, debugValueType);
2628

2729
if (scope.changed)
2830
{
@@ -42,6 +44,13 @@ private object GetDebugValue(SerializedProperty property)
4244

4345
return targetField.GetValue(property.serializedObject.targetObject);
4446
}
47+
private Type GetDebugValueType(SerializedProperty property)
48+
{
49+
Type targetType = property.serializedObject.targetObject.GetType();
50+
FieldInfo targetField = targetType.GetField("_debugValue", BindingFlags.Instance | BindingFlags.NonPublic);
51+
52+
return targetField.FieldType;
53+
}
4554
private void CallMethod(object value)
4655
{
4756
_raiseMethod.Invoke(target, new object[1] { value });

0 commit comments

Comments
 (0)