Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions servers/physics_server_2d_wrap_mt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions servers/physics_server_3d_wrap_mt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading