基于 Unity 2022.3 LTS 版本与 URP 渲染管线,以下命令均在 Console 窗口或脚本中实测通过。物理引擎使用 PhysX 4.1,部分设置需通过 Physics Debugger 验证。
打开 Profiler 后,在 Console 执行 Physics.autoSimulation = false 可临时关闭自动物理模拟,快速定位是碰撞计算还是渲染拖慢了帧率。配合 Physics.Simulate(Time.fixedDeltaTime) 手动步进,观察 Profiler 的 Physics 模块耗时曲线。建议在 Editor 中先关掉 Auto Simulation,再逐帧调试。