-
Notifications
You must be signed in to change notification settings - Fork 113
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
Hook for default base Aspect-mapping on all systems #371
Comments
We could create a hook for default base Aspect-mapping for all systems; holding it off until post-1.0, but I agree it'd be a better fit for contrib. Something like: Aspect.default().exclude(Disabled.class) |
oh me like! might be a good fit for core really. |
Aspect.default().exclude(Disabled.class) The above would not play nice with multi-World configurations. Better to set the default aspect on the WorldConfiguration instead. But how to deal with aspects with and without the default aspect? Must be exposed by the AspectSubscriptionManager. |
ice-boxing |
I'd be interested in this feature as well as contributing. My use case is exaclty the the given example. Examples:
I would also prefer defining the default aspect in the world configuration. For aspects with/without applying the default aspect, how about something like Greetings, Edit: Ignore first commit below, pushed too early, did too much. |
I've been working on this on my fork, and I had to touch more places than I anticipated. Here's an overview what I've done:
This should result in no runtime changes for existing applications and a slight overhead for creations of EntitySubscriptions. I'm currently using those changes in a project of mine and I would open a PR depending on feedback and how my tests go. |
Interesting. Sorry for taking too long to respond.
How much additional overhead are we talking about here? Does it show in the benchmarks? |
Haven't run any benchmarks, that statement was solely based on the fact that all the work is done when creating a EntitySubscription. |
See below.
The text was updated successfully, but these errors were encountered: