-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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 example update_gltf_scene: add label to load asset #1204
Conversation
That fixes it for me 👍🏼 Without the fix to the asset path, should a non-fatal error have been logged to the console? That's what I would have naively expected, not knowing how gltf files work. |
That's part of the "asynchronous is hard for error reporting" category... By calling Since #1020, loading a GLTF file won't give an handle to a scene but a handle to a gltf struct. I would like to have the default scene being used by default in this case, but haven't found a good way to do it without binding scene to how gltf works which I'd like to avoid. I'm open for ideas if you have some on this subject! |
I would expect any asset backend that's actually doing the loading to emit an error to the log if it fails to load the asset in question. I think that's both easy to do and sufficient handling for Bevy's current level of maturity. That's all I was really getting at. But since you asked...and it was an interesting question...here some ideas for more robust handling that could be considered for the future 😄. These ideas are all about asset system as a whole, though, not just gltf. Also, I know little about the current asset system implementation, so maybe something like these ideas (or better!) are already in place!
|
But in this case, nothing failed. The loader was able to load something from the file, and saved it to the Handle. The scene spawner tried to load the asset from the handle and found nothing, but that's normal behaviour as the asset is maybe not done loading
Looking at how it handles error, loading something can return a
That's supposedly done by the
There is
I think I remember a discussion on discord about that, people were splitter on whether that was a good idea... There are a few things that could be improved, but I think it's better to wait for the atelier integration before spending too much time on that... Thinking on the specific problem of gltf, I think a great fix would be to be able to have different default asset from the same handle, without label, if they have different type. That is, from the same handle, I could get a default scene, a default gltf, ... depending on how it's used. I'll keep that in mind for when atelier is integrated 👍 |
Yup good thoughts all around. I agree that we should probably hold off on major asset system changes until after the atelier migration (which will likely introduce new and different problems for us to solve 😄) |
Ah, tricky. Thanks for all the info and explanations! I'm looking forward to seeing how things work after the atelier migration. |
sorry for the mix...