Skip to content

Fix Sprite2D error spam in exported project #107360

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

Merged
merged 1 commit into from
Jun 12, 2025

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Jun 10, 2025

Fixes regression from #106553
The signal only exists in editor build, but always gets emitted, resulting in error spam about non-existent signal in exported project.

@KoBeWi KoBeWi added this to the 4.5 milestone Jun 10, 2025
@KoBeWi KoBeWi requested a review from a team as a code owner June 10, 2025 14:27
#ifdef TOOLS_ENABLED
add_user_signal(MethodInfo("_editor_region_rect_enabled"));
#endif
if (Engine::is_editor_hint()) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This evaluates to always false in non-tool build, so #ifdef shouldn't be needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the ifdef is a small optimization isn't it?

Copy link
Member Author

@KoBeWi KoBeWi Jun 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By "shouldn't be needed" I meant that the compiler might optimize it out, because it's no-op. It's just a guess though.

@akien-mga akien-mga merged commit f485f6c into godotengine:master Jun 12, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@KoBeWi KoBeWi deleted the spamilion branch June 12, 2025 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants