Replies: 1 comment 1 reply
-
FYI |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Has there ever been any thought into query filters which yield for handles as components, when the assets behind those handles are loaded, changed, removed, etc.. ?
I noticed that handles are de facto components, and can be added to entities via commands.spawn(..) or similar.
Looking at the systems for managing Sprite, I saw that (at least for sprites) the technique is to respond to the AssetEvent messages, and then crawl through a query to find the associated entities which contain that handle (in this case as members of the Sprite struct).Edit: my mistake, the handle is part of SpriteBundle, not Sprite.
Would there be value in adding QueryFilter variants such as AssetLoaded, AssetModified, etc.. which would allow the user to yield on these events directly in the query syntax and not need to search on their own through the AssetEvent messages?
Just an interesting quality of life improvement that I was thinking of. Please let me know if this seems like a good idea, or if it's a terrible idea for reasons I'm not foreseeing.
Beta Was this translation helpful? Give feedback.
All reactions