Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
EngineProfiler
继承: RefCounted < Object
用于创建自定义分析器的基类。
描述
这个类可用于实现自定义分析器,能够与引擎和编辑器调试器进行交互。
有关详细信息,请参阅 EngineDebugger 和 EditorDebuggerPlugin。
方法
void |
_add_frame(data: Array) virtual |
void |
_tick(frame_time: float, process_time: float, physics_time: float, physics_frame_time: float) virtual |
void |
方法说明
void _add_frame(data: Array) virtual 🔗
使用 EngineDebugger.profiler_add_frame_data() 将数据加入分析器时调用。
void _tick(frame_time: float, process_time: float, physics_time: float, physics_frame_time: float) virtual 🔗
当分析器使用有关当前帧的信息处于活动状态时,每次引擎迭代调用一次。所有时间值都以秒为单位。较低的值表示更快的处理时间,因此被认为更好。
void _toggle(enable: bool, options: Array) virtual 🔗
启用/禁用分析器时调用,提供了一组选项 options
。