Merge pull request #47082 from nekomatata/collision-debug-shape-game-only-3.3
[3.3] Disable debug collision shapes in the editor
This commit is contained in:
commit
0d0841e08e
1 changed files with 2 additions and 1 deletions
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "collision_object.h"
|
||||
|
||||
#include "core/engine.h"
|
||||
#include "mesh_instance.h"
|
||||
#include "scene/scene_string_names.h"
|
||||
#include "servers/physics_server.h"
|
||||
|
@ -143,7 +144,7 @@ void CollisionObject::_update_debug_shapes() {
|
|||
}
|
||||
|
||||
void CollisionObject::_update_shape_data(uint32_t p_owner) {
|
||||
if (is_inside_tree() && get_tree()->is_debugging_collisions_hint()) {
|
||||
if (is_inside_tree() && get_tree()->is_debugging_collisions_hint() && !Engine::get_singleton()->is_editor_hint()) {
|
||||
if (debug_shapes_to_update.empty()) {
|
||||
call_deferred("_update_debug_shapes");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue