Checkpoint 7 测试结论:
- TickEnemies 有明显 GC 增长,主要来自桶结构每帧重建 - Simulation 内核仍直接依赖 Transform(不是纯数据更新) - 引入 P1.5 来解决上述问题,避免 P2 进行 Job 替换时返工
This commit is contained in:
@@ -4,6 +4,7 @@ namespace CustomDebugger
|
||||
{
|
||||
public static class CustomProfilerMarker
|
||||
{
|
||||
public static readonly ProfilerMarker TickEnemies = new ProfilerMarker("TickEnemies");
|
||||
public static readonly ProfilerMarker Movement_Update = new ProfilerMarker("Movement_Update");
|
||||
public static readonly ProfilerMarker ShopUI_Update = new("UGF.ShopUI.Update");
|
||||
public static readonly ProfilerMarker Inventory_Refresh = new("UGF.Inventory.Refresh");
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using CustomDebugger;
|
||||
using CustomUtility;
|
||||
using Unity.Profiling;
|
||||
using UnityEngine;
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
@@ -214,7 +216,10 @@ namespace Simulation
|
||||
return;
|
||||
}
|
||||
|
||||
TickEnemies(in context);
|
||||
using (CustomProfilerMarker.TickEnemies.Auto())
|
||||
{
|
||||
TickEnemies(in context);
|
||||
}
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
|
||||
@@ -1426,7 +1426,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 8a558ebbc9cb4d94946ac9f4f27914d8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_useSimulationMovement: 0
|
||||
_useSimulationMovement: 1
|
||||
--- !u!1 &1852670052
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
Reference in New Issue
Block a user