add scriptable object examples

add editor window example
add attribute + drawer example
This commit is contained in:
2025-06-13 18:07:18 +02:00
parent 0ae837c57b
commit a6dbfb224f
52 changed files with 1460 additions and 533 deletions
@@ -0,0 +1,22 @@
using UnityEditor;
using UnityEngine;
using UnityEngine.UIElements;
namespace Events
{
[CustomEditor(typeof(EventBroker))]
public class EventBrokerEditor : Editor
{
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
if (!EditorApplication.isPlaying) return;
if (GUILayout.Button("Player Died"))
{
(target as EventBroker)?.RaisePlayerDied();
}
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 12b0037e847a41a1b18c0ef2643e47a8
timeCreated: 1749825911