MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / profiler_enable

Method profiler_enable

core/debugger/engine_debugger.cpp:79–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79void EngineDebugger::profiler_enable(const StringName &p_name, bool p_enabled, const Array &p_opts) {
80 ERR_FAIL_COND_MSG(!profilers.has(p_name), vformat("Can't change profiler state, no profiler: '%s'.", p_name));
81 Profiler &p = profilers[p_name];
82 if (p.toggle) {
83 p.toggle(p.data, p_enabled, p_opts);
84 }
85 p.active = p_enabled;
86}
87
88void EngineDebugger::profiler_add_frame_data(const StringName &p_name, const Array &p_data) {
89 ERR_FAIL_COND_MSG(!profilers.has(p_name), vformat("Can't add frame data, no profiler: '%s'.", p_name));

Callers 1

deinitializeMethod · 0.45

Calls 3

vformatFunction · 0.85
hasMethod · 0.45
toggleMethod · 0.45

Tested by

no test coverage detected