Skip to content

Emit warning when Pickable added to an entity whose mesh is unloaded from main world #19207

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
Runi-c opened this issue May 13, 2025 · 0 comments
Labels
C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled

Comments

@Runi-c
Copy link

Runi-c commented May 13, 2025

What problem does this solve or what need does it fill?

I lost several hours to a silent failure caused by specifying RenderAssetUsages::RENDER_WORLD on a procedural mesh builder. I figured this was safe since the docs don't mention any footguns associated with this setting, in fact they recommend it for unchanging assets:

    /// If your asset does not change, consider using `RenderAssetUsages::RENDER_WORLD` exclusively. This will cause
    /// the asset to be unloaded from the main world once it has been prepared for rendering.

but when I later added the MeshPickingPlugin it simply doesn't see any of the meshes without giving any hint as to why.

What solution would you like?

Emit a warning when a mesh with RENDER_WORLD asset usage is added alongside a non-ignore Pickable component, as I don't think this could ever be intended usage.

What alternative(s) have you considered?

Several doc improvements could allay this issue as well, chief among which warnings added to RenderAssetUsages and maybe Pickable or MeshPickingSettings.

@Runi-c Runi-c added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled
Projects
None yet
Development

No branches or pull requests

1 participant