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

Fix Camera2DEditorPlugin crash when reloading scene #104350

Closed

Conversation

beicause
Copy link
Contributor

@beicause beicause commented Mar 19, 2025

Fix a regression from #101427 that reloading a scene with Camera2D crashes the editor.

Edit: #104190 refactors the Camera2DEditorPlugin. I'm not sure if #104190 has fixed this issue, but before it is merged, I need this PR to resolve the issue first.

@beicause beicause requested a review from a team as a code owner March 19, 2025 06:40
@beicause beicause changed the title Fix Camera2DEditorPlugin crash Fix Camera2DEditorPlugin crash when reloading scene Mar 19, 2025
@beicause beicause force-pushed the fix-camera2d-editor-plugin-crash branch 3 times, most recently from 7219d65 to 3f1a8af Compare March 19, 2025 07:42
@beicause beicause force-pushed the fix-camera2d-editor-plugin-crash branch from 3f1a8af to 5ab4e05 Compare March 19, 2025 07:44
@akien-mga akien-mga requested a review from KoBeWi March 19, 2025 08:29
@akien-mga akien-mga added this to the 4.5 milestone Mar 19, 2025
@KoBeWi
Copy link
Member

KoBeWi commented Mar 19, 2025

The bug is caused by Camera2DEditor not getting edit() called for null camera (editor sends null automatically, there is no need to explicitly handle scene changing).
#104190 will fix this.

@beicause beicause closed this Mar 19, 2025
@KoBeWi KoBeWi removed this from the 4.5 milestone Mar 19, 2025
@beicause beicause deleted the fix-camera2d-editor-plugin-crash branch March 19, 2025 13:07
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