Only print physics sync warning on dev builds to avoid warning spam from using move_and_slide

The check should be restored once we implement move_and_slide in a way that doesn't sync the physics thread
This commit is contained in:
clayjohn 2024-07-12 09:57:44 -07:00
parent 383a6e4ef2
commit 8ce4f655f4
2 changed files with 8 additions and 0 deletions

View File

@ -45,7 +45,11 @@
#endif
#ifdef DEBUG_ENABLED
#ifdef DEV_ENABLED
#define MAIN_THREAD_SYNC_WARN WARN_PRINT("Call to " + String(__FUNCTION__) + " causing PhysicsServer2D synchronizations on every frame. This significantly affects performance.");
#else
#define MAIN_THREAD_SYNC_WARN
#endif
#endif
class PhysicsServer2DWrapMT : public PhysicsServer2D {

View File

@ -44,7 +44,11 @@
#endif
#ifdef DEBUG_ENABLED
#ifdef DEV_ENABLED
#define MAIN_THREAD_SYNC_WARN WARN_PRINT("Call to " + String(__FUNCTION__) + " causing PhysicsServer3D synchronizations on every frame. This significantly affects performance.");
#else
#define MAIN_THREAD_SYNC_WARN
#endif
#endif
class PhysicsServer3DWrapMT : public PhysicsServer3D {