| 77 | } |
| 78 | |
| 79 | void 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 | |
| 88 | void 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)); |
no test coverage detected