SharperUniverse icon indicating copy to clipboard operation
SharperUniverse copied to clipboard

Allow constraint of one component per system

Open trustieee opened this issue 6 years ago • 0 comments

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.

trustieee avatar May 28 '18 06:05 trustieee