-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Add resource hooks (and observers) #12231
Copy link
Copy link
Open
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleA new feature, making something new possibleD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixesA "normal" level of difficulty; suitable for simple features or challenging fixesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!X-BlessedHas a large architectural impact or tradeoffs, but the design has been endorsed by decision makersHas a large architectural impact or tradeoffs, but the design has been endorsed by decision makers
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleA new feature, making something new possibleD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixesA "normal" level of difficulty; suitable for simple features or challenging fixesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!X-BlessedHas a large architectural impact or tradeoffs, but the design has been endorsed by decision makersHas a large architectural impact or tradeoffs, but the design has been endorsed by decision makers
Type
Projects
Status
SME Triaged
What problem does this solve or what need does it fill?
Hooks, which give users the ability to respond to components being added and removed (in #10756) are really neat: reasonably performant, atomic, hard to mess up.
I'd like to be able to use this for resources as well: see #11426 for an in-engine design where I think this might help simplify the design and make things more robust.
What solution would you like?
Mirror the work in #10756 and #10839 for resources, condensing internal structure to avoid duplication as needed.
What alternative(s) have you considered?
Don't bother implementing this: the truly complex cases (hierarchies, indexes, relations) that motivate hooks and observers for components are less applicable for resources.
Additional context
I'm not 100% sure we should add this, and am very happy to wait and see if there's a real need or desire for this. But users will ask, and I wanted to open a central place for discussion on design/need/implementation.