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 alien_cake_addict example #16281

Merged
merged 4 commits into from
Nov 7, 2024

Conversation

BenjaminBrienen
Copy link
Contributor

@BenjaminBrienen BenjaminBrienen commented Nov 7, 2024

Objective

Fixes #15729

Solution

Use the state-scoped pattern.

Testing

Tested manually. See the showcase.


Showcase

Screen.Recording.2024-11-07.201740.mp4

@BenjaminBrienen BenjaminBrienen self-assigned this Nov 7, 2024
@BenjaminBrienen BenjaminBrienen added A-ECS Entities, components, systems, and events C-Examples An addition or correction to our examples P-Regression Functionality that used to work but no longer does. Add a test for this! D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Nov 7, 2024
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

Much nicer, in addition to fixing the bug!

@alice-i-cecile alice-i-cecile added this to the 0.15 milestone Nov 7, 2024
Copy link
Member

@LiamGallagher737 LiamGallagher737 left a comment

Choose a reason for hiding this comment

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

Worked locally for me and the code is also an improvement

@rparrett
Copy link
Contributor

rparrett commented Nov 7, 2024

I am missing something. Could you help me understand the underlying bug and why these changes fix it?

@BenjaminBrienen
Copy link
Contributor Author

BenjaminBrienen commented Nov 7, 2024

I am missing something. Could you help me understand the underlying bug and why these changes fix it?

The lighting bugs out due to too many entities being despawned. See the video in the issue.
Here's a screenshot from me running it on main:
384100600-ad299827-63b7-49d2-be44-4ded13f571ee

@rparrett
Copy link
Contributor

rparrett commented Nov 7, 2024

I understood what the bug is, but not why this is fixing it.

I was able to dig up the related conversation in discord though.

It seems that the previous method of tearing down the scene was likely despawning an important Observer or other engine-internal entity. That's the context I was looking for. Makes sense.

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Nov 7, 2024
Merged via the queue into bevyengine:main with commit 94f2fe3 Nov 7, 2024
29 checks passed
@BenjaminBrienen BenjaminBrienen deleted the fix-alien-example branch November 10, 2024 07:52
@BenjaminBrienen BenjaminBrienen removed the S-Needs-Review Needs reviewer attention (from anyone!) to move forward label Nov 10, 2024
mockersf pushed a commit that referenced this pull request Nov 11, 2024
# Objective

Fixes #15729

## Solution

Use the state-scoped pattern.

## Testing

Tested manually. See the showcase.

---

## Showcase



https://github.com/user-attachments/assets/14ffefca-40c6-4c7e-b15b-f92466a2b0a5
ecoskey pushed a commit to ecoskey/bevy that referenced this pull request Dec 2, 2024
# Objective

Fixes bevyengine#15729

## Solution

Use the state-scoped pattern.

## Testing

Tested manually. See the showcase.

---

## Showcase



https://github.com/user-attachments/assets/14ffefca-40c6-4c7e-b15b-f92466a2b0a5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Examples An addition or correction to our examples D-Straightforward Simple bug fixes and API improvements, docs, test and examples P-Regression Functionality that used to work but no longer does. Add a test for this!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

alien_cake_addict example lighting issues
4 participants