SharperUniverse
SharperUniverse copied to clipboard
Allow constraint of one component per system
It would be swell if there was an option when registering a component to explicitly state that this will be the only instance of this component registered to the system.
Perhaps:
RegisterComponentAsync(...).AsSingleton()
or
RegisterSingleInstanceComponentAsync(...)
It may be useful to add an extension method for retrieving the only Component from the Components list for a system as well in these cases.