Made static fields have different values
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user