behaviour_inject
behaviour_inject copied to clipboard
Inversion of Control / Dependency Injection tool for Unity3d
- changed concept: all global contexts share same EventManager - EventManager supports WeakReferences + ConditionalWeakTable (CWT) - EventManager supports AOT generic event handlers which to increase performance. You can still...
Using OnContextDestroyed event causes additional memory allocation, wich might be significant if there are many objects.
If pre-created dependency is regisetered multiple times as different interfaces, it's Dispose method will be called multiple times accordingly. ` A a = Create(); _context = Context.Create(ContextNames.APPLICATION); _context .RegisterDependencyAs(a) .RegisterDependencyAs(a);...
Allow to create context in HierarchyContext component to contain events inside local hierarchy.
It's possible to find and init classes that implements IContextCreator and are marked by attribute containing name of the context
Make it possible to define default context for current scene. This will allow "use hirarchy" option to work even without hierarchy context component and avoid binding prefabs to particular contexts.
Sometimes there's a need for conditional context configuration, dependent on other contexts. May be there should be another component ContextCreationInitalizer, that trigger context creation an allow to inject dependencies into...
think on methods of dependency aggregation into collections