@@ -173,7 +173,6 @@ void CollisionShape3D::_bind_methods() {
173
173
ADD_PROPERTY (PropertyInfo (Variant::OBJECT, " shape" , PROPERTY_HINT_RESOURCE_TYPE, " Shape3D" ), " set_shape" , " get_shape" );
174
174
ADD_PROPERTY (PropertyInfo (Variant::BOOL, " disabled" ), " set_disabled" , " is_disabled" );
175
175
176
- #ifdef DEBUG_ENABLED
177
176
ClassDB::bind_method (D_METHOD (" set_debug_color" , " color" ), &CollisionShape3D::set_debug_color);
178
177
ClassDB::bind_method (D_METHOD (" get_debug_color" ), &CollisionShape3D::get_debug_color);
179
178
@@ -185,7 +184,6 @@ void CollisionShape3D::_bind_methods() {
185
184
ADD_PROPERTY_DEFAULT (" debug_color" , Color (0.0 , 0.0 , 0.0 , 0.0 ));
186
185
187
186
ADD_PROPERTY (PropertyInfo (Variant::BOOL, " debug_fill" ), " set_enable_debug_fill" , " get_enable_debug_fill" );
188
- #endif // DEBUG_ENABLED
189
187
}
190
188
191
189
void CollisionShape3D::set_shape (const Ref<Shape3D> &p_shape) {
@@ -246,8 +244,6 @@ bool CollisionShape3D::is_disabled() const {
246
244
return disabled;
247
245
}
248
246
249
- #ifdef DEBUG_ENABLED
250
-
251
247
Color CollisionShape3D::_get_default_debug_color () const {
252
248
const SceneTree *st = SceneTree::get_singleton ();
253
249
return st ? st->get_debug_collisions_color () : Color (0.0 , 0.0 , 0.0 , 0.0 );
@@ -285,6 +281,8 @@ bool CollisionShape3D::get_debug_fill_enabled() const {
285
281
return debug_fill;
286
282
}
287
283
284
+ #ifdef DEBUG_ENABLED
285
+
288
286
bool CollisionShape3D::_property_can_revert (const StringName &p_name) const {
289
287
if (p_name == " debug_color" ) {
290
288
return true ;
@@ -324,9 +322,7 @@ void CollisionShape3D::_shape_changed() {
324
322
CollisionShape3D::CollisionShape3D () {
325
323
// indicator = RenderingServer::get_singleton()->mesh_create();
326
324
set_notify_local_transform (true );
327
- #ifdef DEBUG_ENABLED
328
325
debug_color = _get_default_debug_color ();
329
- #endif // DEBUG_ENABLED
330
326
}
331
327
332
328
CollisionShape3D::~CollisionShape3D () {
0 commit comments