Added ProfilerWindow
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using System.Threading;
|
||||
using PashaBibko.Pacore.Attributes;
|
||||
using PashaBibko.Pacore.DevTools;
|
||||
using UnityEngine;
|
||||
|
||||
[CreateInstanceOnStart] public class TestMonoBehaviour : MonoBehaviour
|
||||
@@ -12,6 +14,20 @@ using UnityEngine;
|
||||
|
||||
private void OnTestChange() => LogTestValue();
|
||||
|
||||
private void Update()
|
||||
{
|
||||
using (CodeProfiler.Start("Test Snippet"))
|
||||
{
|
||||
SpinWait sw = new();
|
||||
int count = Random.Range(1, 50);
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
sw.SpinOnce();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[InspectorCallable(nameof(LogSpawnableType))]
|
||||
public void LogSpawnableType()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user