性能优化与检测, 防止假死机

This commit is contained in:
2025-12-09 15:12:25 +08:00
parent 5ab19e39f2
commit eebf283e12
6 changed files with 66 additions and 18 deletions

View File

@@ -137,9 +137,16 @@ namespace Demo.Game
{
yield return base.DoSomethingDuringApplyScript();
MyMeshGenerator = this.GetOrAddComponent<TMeshGenerator>();
MyMeshGenerator.spline = MySplineCore.MySplineComputer;
SetupMeshGenerator(MyMeshGenerator);
MyMeshGenerator.RebuildImmediate();
if (MySplineCore)
{
MyMeshGenerator.spline = MySplineCore.MySplineComputer;
SetupMeshGenerator(MyMeshGenerator);
MyMeshGenerator.RebuildImmediate();
}
else
{
Debug.LogError($"{nameof(MySplineCore)} not setup", this);
}
}
#region SetupMeshGenerator