I am testing out the capabilities of VContainer for a little side project, now what I am trying to figure out is the best way to setup a factory, all works fine with instantiating prefabs but it gets a bit more complex if I want to follow an MVP pattern.
Besides manually creating the presenter and its dependencies I found the two solutions below to work.
Is there a way to easily register entry points such as ITickable or IStartable for classes created at runtime through a factory? that would be the only piece of logic I am missing, otherwise I am happy with the result.
Note: for the purpose if this example there is no model but it would be easy to add.
I am testing out the capabilities of VContainer for a little side project, now what I am trying to figure out is the best way to setup a factory, all works fine with instantiating prefabs but it gets a bit more complex if I want to follow an MVP pattern.
Besides manually creating the presenter and its dependencies I found the two solutions below to work. Is there a way to easily register entry points such as
ITickable
orIStartable
for classes created at runtime through a factory? that would be the only piece of logic I am missing, otherwise I am happy with the result.Note: for the purpose if this example there is no model but it would be easy to add.