Made serilaized static values be set

This commit is contained in:
2026-01-26 16:00:04 +00:00
parent edc272945c
commit 728464a327
6 changed files with 17 additions and 22 deletions

View File

@@ -1,21 +1,22 @@
using PashaBibko.Pacore.Attributes;
using UnityEngine;
[CreateInstanceOnStart, AllowStaticInspectorFields]
public class TestMonoBehaviour : MonoBehaviour
[CreateInstanceOnStart] public class TestMonoBehaviour : MonoBehaviour
{
public int TestValue;
[StaticInspectorField] private static string StaticText;
[StaticInspectorField] private static string OtherStaticText;
[StaticInspectorField] private static int StaticInt;
[StaticInspectorField] private static int StaticInt = 0;
[StaticInspectorField] private static int OtherStaticInt = 0;
[InspectorCallable(nameof(PrintStaticFields))]
public void PrintStaticFields()
{
Debug.Log
(
$"{nameof(TestValue)}: [{TestValue}] " +
$"{nameof(StaticInt)}: [{StaticInt}] " +
$"{nameof(OtherStaticInt)}: [{OtherStaticInt}] " +
$"{nameof(StaticText)}: [{StaticText}] " +
$"{nameof(OtherStaticText)}: [{OtherStaticText}]"
);