Files
Pacore/Assets/TestMonoBehaviour.cs
2026-01-24 22:08:59 +00:00

33 lines
822 B
C#

using System.Threading;
using PashaBibko.Pacore.Attributes;
using PashaBibko.Pacore.DevTools;
using UnityEngine;
[CreateInstanceOnStart] 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}]");
}
[InspectorCallable("Other Test button")] public void DontLogTestValue()
{
Debug.Log("Test");
}
}