Added Thread enforcers

This commit is contained in:
2026-01-25 13:49:05 +00:00
parent 24820fe646
commit abe3a4149b
4 changed files with 57 additions and 7 deletions

View File

@@ -1,6 +1,8 @@
using System;
using System.Threading;
using PashaBibko.Pacore.Attributes;
using PashaBibko.Pacore.DevTools;
using PashaBibko.Pacore.Threading;
using UnityEngine;
[CreateInstanceOnStart] public class TestMonoBehaviour : MonoBehaviour
@@ -22,11 +24,13 @@ using UnityEngine;
[InspectorCallable("Test button")] public void LogTestValue()
{
Debug.Log($"Test value [{Test}]");
}
[InspectorCallable("Other Test button")] public void DontLogTestValue()
{
Debug.Log("Test");
try
{
ThreadSafe.EnforceBackgroundThread();
}
catch (Exception err)
{
Debug.LogError(err.Message);
}
}
}