Releases: ssannandeji/Zenject-2019
Version 4.1
NOTE: Documentation is still severely out of date which is the reason this is still marked as pre-release
- Changed ResolveAll method to be optional by default, so it can return the empty list
- Removed Zenject.Commands namespace in favour of just Zenject
- Added convention based binding (eg. Container.Bind().To(x => x.AllTypes().DerivingFrom()))
- Fixed GameObjectCompositionRoot to expose an optional facade property in its inspector
- Renamed CompositionRoot to Context.
- Changed to just re-use the InjectAttribute instead of PostInjectAttribute
- Better support for making custom Unity EditorWindow implementations that use Zenject
- Added right click Menu items in project pane to create templates of common zenject C# files
- Renamed TestWithContainer to ZenjectUnitTestFixture
- Added simple test framework for both unit tests and integration tests
- Changed Identifier to be type object so it can be used with enums (or other types)
- Added InjectLocal attribute
- Changed to guarantee that any component that is injected into another component has itself been injected already
- Fixed an issue where calling Resolve<> or Instantiate<> inside an installer would cause objects to be injected twice
- Fixes to WSA platform
- Changed to automatically call ScriptableObject.CreateInstance when creating types that derive from ScriptableObject
- Fix to non-unity build
Version 3.11
Note: This will be the last release of Zenject 3.x (Zenject 4 introduces some API-breaking changes).
- Bug fix - Calling Resolve<> or Instantiate<> inside an installer was causing the object to be injected twice
- Added StaticCompositionRoot as an even higher level container than ProjectCompositionRoot, for cases where you want to add dependencies directly to the Zenject assembly before Unity even starts up
- Bug fix - loading the same scene multiple times with LoadSceneAdditive was not working
- Fixed compiler errors with Unity 5.4
Version 4.0
- Added another property to CompositionRoot to specify installers as prefabs re #96
- Changed global composition root to be a prefab instead of assembling together a bunch of ScriptableObject assets re #98
- Changed to lookup Zenject Auto Binding components by default, without the need for AutoBindInstaller. Also added new properties such as CompositionRoot, identifier, and made Component a list. Also works now when put underneath GameObjectCompositionRoot's.
- Added ability to pass in multiple types to the Bind() method. This opens up a lot of possibilities including convention-based binding. This also deprecated the use of BindAllInterfacesToSingle in favour of just BindAllInterfaces<>
- Added "WithArguments" bind method, to allow passing arguments directly to the type instead of always using WhenInjectedInto
- Added concept of EditorWindowCompositionRoot to make it easier to use Zenject with editor plugins
- Added "InheritInSubContainers" bind method, to allow having bindings automatically forwarded to sub containers
- Removed the different Exception classes in favour of just one (ZenjectException)
- Added 'AsCached' method as an alternative to 'AsSingle' and 'AsTransient'. AsCached will function like AsTransient except it will only create the object once and thereafter return that value
- Changed some methods that previously used 'params' to explicitly take a list, to avoid common errors
- Cleaned up InjectContext to be easier to work with
- Made significant change to how Factories work. Now there is just one definitive Factory class, and you can change how that factory constructs the object in your installers
- Changed the fluent interface to specify whether the binding is single or transient as a separate method, to avoid the explosion of ToSinglePrefab, ToTransientPrefab, etc. (now it's just ToPrefab)
- Renamed GlobalCompositionRoot to ProjectCompositionRoot and FacadeCompositionRoot to GameObjectCompositionRoot.
- Added more intuitive bindings for creating subcontainers. eg: Container.Bind().ToSubContainerResolve().ByPrefab()
- Added WithGameObjectName and WithGroupName bind methods to prefab or game object related bindings
- Made another big chagne to the fluent interface to avoid having duplicate methods for with Self and Concrete. Now you choose between Container.Bind().ToSelf() and Container.Bind().To(). ToSelf is assumed if unspecified
- Changed Triggers to directly expose the signal event so they can be used as if they are signals
- Added concept of ScriptableObjectInstaller - especially useful for use with settings
- Added ZenjectSceneLoader class to allow additively loading other scenes as children or siblings of existing scene
- Changed scene decorators to work more intuitively with the multi-scene editting features of Unity 5.3+. You can now drag in multiple scenes together, and as long as you use DecoratorCompositionRoot in scenes above a main scene, they will be loaded together.
- Removed IncludeInactive flag. Now always injects into inactive game objects. This was kinda necessary because validation needs to control the active flag
- Removed the concept of one single DependencyRoot in favour of having any number of them, using binding with identifier. Also added NonLazy() bind method to make this very easy
- Added new attribute ZenjectAllowDuringValidation for use with installer setting objects that you need during validation
- Changed validation to occur at runtime to be more robust and less hacky. Now works by adding dummy values to mark which dependencies have successfully been found
- Renamed BindPriority to BindExecutionOrder
- Removed support for binary version of Zenject. This was necessary since Zenject now needs to use some unity defines (eg. UNITY_EDITOR) which doesn't work in DLLs
Note that the documentation has not been updated yet to reflect all these changes.
Version 3.10
- Added pause/resume methods to TickableManager
- Fixed to actually support Windows Store platform
- Bug fix - OnlyInjectWhenActive flag did not work on root inactive game objects
Version 3.9
- Added a lot more error checking when using the ToSingle bindings. It will no longer allow mixing different ToSingle types
- Fixed ToSingleGameObject and ToSingleMonoBehaviour to allow multiple bindings to the same result
- Made it easier to construct SceneCompositionRoot objects dynamically
- Added untyped versions of BindIFactory.ToFactory method
- Removed the ability warn on missing ITickable/IInitializbale bindings
- Added a bunch of integration tests
- Reorganized folder structure
Version 3.8
Changed back to only initializing the GlobalCompositionRoot when starting a scene with a SceneCompositionRoot rather than always starting it in every scene
Version 3.7
NOTE: This version requires Unity 5.3 or greater, since it uses the new SceneManager API and RuntimeInitializeOnLoadMethod
- Changed to not bother parenting transforms to the CompositionRoot object by default (This is still optional with a checkbox however)
- Added string parameter to BindGameObjectFactory method to allow specifying the name of an empty GameObject to use for organization
- Changed FacadeFactory to inherit from IFactory
- Changed GlobalCompositionRoot to initialize using Unity's new [RuntimeInitializeOnLoadMethod] attribute. This means that you don't need a SceneCompositionRoot in your scene to have the GlobalCompositionRoot initialize
- Added easier ability to validate specific scenes from the command line outside of Unity
- Added AutoBindInstaller class and ZenjectAutoBinding attribute to make it easier to add MonoBehaviours that start in the scene to the container
- Added optional parameter to the [Inject] attribute to specify which container to retrieve from in the case of nested containers
- Fixed some unity-specific bind commands to play more nicely with interfaces
Version 3.6
Made some more tweaks to signals as part of discussion in issue #75 . The main change in this release is that you don't need to declare the parameter types when binding signals or triggers in your installer.
Version 3.5
After discussion in this issue, we decided to break the way signals and triggers work to make the api a bit cleaner. This also adds the ability to add conditions to signal bindings.
Version 3.4
- Cleaned up directory structure
- Fixed bug with Global bindings not getting their Tick() called in the correct order
- Fixes to the releases automation scripts