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.

EngineProfiler

繼承: RefCounted < Object

用於建立自訂分析器的基底類別。

說明

這個類可用於實作自訂分析器,能夠與引擎和編輯器除錯器進行互動。

有關詳細資訊,請參閱 EngineDebuggerEditorDebuggerPlugin

方法

void

_add_frame(data: Array) virtual

void

_tick(frame_time: float, process_time: float, physics_time: float, physics_frame_time: float) virtual

void

_toggle(enable: bool, options: Array) virtual


方法說明

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