maint: added livewatch asset

This commit is contained in:
Chris
2025-08-31 18:14:07 -04:00
parent 7f5d95787b
commit ae2371a6fa
385 changed files with 150792 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
using System;
using UnityEngine;
namespace Ingvar.LiveWatch.TowerDefenceDemo
{
[DefaultExecutionOrder(-99999)]
public class TD_WatchManager : MonoBehaviour
{
private void Awake()
{
Watch.DestroyAll();
Watch.GetOrAdd("Frame", () => Time.frameCount)
.SetAlwaysCollapsable()
.SetSortOrder(TD_WatchSortOrder.Frame);
Watch.GetOrAdd("FPS", () => (int)(1f / Time.unscaledDeltaTime))
.SetAlwaysCollapsable()
.SetSortOrder(TD_WatchSortOrder.FPS);
Watch.GetOrAdd("TimeScale", () => Time.timeScale)
.SetAlwaysCollapsable()
.SetSortOrder(TD_WatchSortOrder.TimeScale);
}
private void LateUpdate()
{
Watch.UpdateAll();
}
}
}