I'm trying to use Monix Vars in Components instead of plain variables. For testing I need to be able to provide a different Scheduler, thus I need constructor parameters.
com.artemis.InvalidComponentException: ExampleComponent: missing public constructor
at com.artemis.ComponentTypeFactory.createComponentType(ComponentTypeFactory.java:65)
at com.artemis.ComponentTypeFactory.getTypeFor(ComponentTypeFactory.java:54)
at com.artemis.ComponentTypeFactory.getIndexFor(ComponentTypeFactory.java:100)
at com.artemis.Aspect$Builder.associate(Aspect.java:359)
at com.artemis.Aspect$Builder.build(Aspect.java:350)
at com.artemis.EntitySubscription.<init>(EntitySubscription.java:32)
at com.artemis.AspectSubscriptionManager.createSubscription(AspectSubscriptionManager.java:68)
at com.artemis.AspectSubscriptionManager.get(AspectSubscriptionManager.java:64)
at com.artemis.BaseEntitySystem.getSubscription(BaseEntitySystem.java:57)
at com.artemis.BaseEntitySystem.setWorld(BaseEntitySystem.java:47)
at com.artemis.WorldConfiguration.initialize(WorldConfiguration.java:171)
at com.artemis.World.<init>(World.java:89)
Is there no way to use Components that require constructor parameters with artemis-odb?
I'm trying to use Monix Vars in Components instead of plain variables. For testing I need to be able to provide a different Scheduler, thus I need constructor parameters.
Even though EntityEdit.add looks like it allows constructing a Component with non-empty constructor, EntityEdit.add seems to first create the Component without constructor parameters before replacing it with the given Component. Moreover, the World constructor seems to choke on Components with no non-argument constructor:
Is there no way to use Components that require constructor parameters with artemis-odb?