1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-28 16:07:14 +00:00

Add Engine.print_error_messages property to disable printing errors

This can be used during unit test suite runs to hide error and warning
messages.

Care should be taken when using this feature, as it can hide important
information if used wrongly.
This commit is contained in:
Hugo Locurcio
2021-05-01 23:09:48 +02:00
parent 33a0fb6e02
commit 0eb9b414c1
6 changed files with 32 additions and 1 deletions

View File

@@ -189,6 +189,14 @@ bool Engine::is_validation_layers_enabled() const {
return use_validation_layers;
}
void Engine::set_print_error_messages(bool p_enabled) {
_print_error_enabled = p_enabled;
}
bool Engine::is_printing_error_messages() const {
return _print_error_enabled;
}
void Engine::add_singleton(const Singleton &p_singleton) {
singletons.push_back(p_singleton);
singleton_ptrs[p_singleton.name] = p_singleton.ptr;