You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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