Added MonoScript attribute

This commit is contained in:
2026-01-24 14:54:10 +00:00
parent 4f38b6194f
commit bd7edfe0d5
6 changed files with 146 additions and 0 deletions

View File

@@ -4,12 +4,20 @@ using UnityEngine;
public class TestMonoBehaviour : MonoBehaviour
{
[InspectorReadOnly, SerializeField] private GameObject go;
[MonoScript(inherited: typeof(MonoBehaviour))] public string Spawnable;
[DetectInspectorChanges("OnTestChange")]
public int Test;
private void OnTestChange() => LogTestValue();
[InspectorCallable(nameof(LogSpawnableType))]
public void LogSpawnableType()
{
Debug.Log(Spawnable);
}
[InspectorCallable("Test button")] public void LogTestValue()
{
Debug.Log($"Test value [{Test}]");