Skip to content

Replace the FORWARD_DECAL_MESH_HANDLE with a resource that gets cloned out in a hook. #19428

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andriyDev
Copy link
Contributor

Objective

Solution

  • Rather than adding a required component Mesh3d with a default set to FORWARD_DECAL_MESH_HANDLE, we use a hook to change the Mesh3ds asset handle.

Testing

  • decal example still works.

@andriyDev andriyDev added A-Rendering Drawing game state to the screen A-Assets Load files from disk to use for things like images, models, and sounds D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels May 29, 2025
@JMS55
Copy link
Contributor

JMS55 commented May 29, 2025

Can we use a once cell or something instead, to keep the handle as a global variable?

@andriyDev
Copy link
Contributor Author

Using a once cell or similar is probably gonna be quite controversial: it means you can only have one bevy instance running (though that might already be a limitation due to winit or something).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds A-Rendering Drawing game state to the screen D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants