Added MonoScript attribute
This commit is contained in:
@@ -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}]");
|
||||
|
||||
Reference in New Issue
Block a user