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

Warning or message when #mesh suffix is missing #21

Open
stevenctl opened this issue Dec 10, 2022 · 2 comments
Open

Warning or message when #mesh suffix is missing #21

stevenctl opened this issue Dec 10, 2022 · 2 comments

Comments

@stevenctl
Copy link

Not sure what type of asset ends up getting loaded in this case, but Res<Assets<TextMeshFont>>::get yields None without #mesh, so of course nothing would be displayed.

This is the result of me misreading the docs/examples but I feel like something should blow up or yell at me for this.

@stevenctl
Copy link
Author

Alternatively, dropping the requirement for #mesh could be nice. Is that there just to avoid conflicts with other plugins that might expose ttf loaders?

@blaind
Copy link
Owner

blaind commented Jan 2, 2023

The #mesh requirement is not ideal, but it was added as a fix for #9 and #3. The bevy asset loader does not retain original-file-bytes so multiple instances (bevy_text_mesh and other 2d instances) can not be used simultaneously.

I don't see easy solutions here. Probably hard to implement a warning for ::get as well (in this crate). Maybe having bevy asset loader to retain the bytes would be one option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants