Made static fields have different values

This commit is contained in:
2026-01-25 14:50:19 +00:00
parent 4d22a379ab
commit eacff3fc65
4 changed files with 33 additions and 48 deletions

View File

@@ -1,37 +1,16 @@
using PashaBibko.Pacore.Attributes;
using PashaBibko.Pacore.Threading;
using UnityEngine;
using System;
[CreateInstanceOnStart] public class TestMonoBehaviour : MonoBehaviour
{
[InspectorReadOnly, SerializeField] private GameObject go;
[MonoScript(inherited: typeof(MonoBehaviour))] public string Spawnable;
public int TestValue;
[DetectInspectorChanges("OnTestChange")]
public int Test;
[StaticInspectorField] private static string StaticText;
[StaticInspectorField] private static string OtherStaticText;
[StaticInspectorField] private static int StaticInt;
private void OnTestChange() => LogTestValue();
[InspectorCallable(nameof(LogSpawnableType))]
public void LogSpawnableType()
[InspectorCallable(nameof(PrintStaticField))] public void PrintStaticField()
{
Debug.Log(Spawnable);
}
[InspectorCallable("Test button")] public void LogTestValue()
{
try
{
ThreadSafe.EnforceBackgroundThread();
}
catch (Exception err)
{
Debug.LogError(err.Message);
}
Debug.Log(StaticText);
}
}