Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow constraint of one component per system #20

Open
trustieee opened this issue May 28, 2018 · 0 comments
Open

Allow constraint of one component per system #20

trustieee opened this issue May 28, 2018 · 0 comments
Labels
Feature Request A feature that has been requested by a user or maintainer of the engine.

Comments

@trustieee
Copy link

trustieee commented May 28, 2018

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.

@RubyNova RubyNova added the Feature Request A feature that has been requested by a user or maintainer of the engine. label May 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request A feature that has been requested by a user or maintainer of the engine.
Projects
None yet
Development

No branches or pull requests

2 participants