This guide is for developers who are using Zenject in their Unity projects as DLLs.
- Download or clone the Zenject source code on GitHub.
- Move the Zenject source files located inside
Zenject-master > UnityProject > Assets > Plugins > Zenjectoutside
- You will receive some console errors that need resolving but don't worry, these are caused by DLL usages requests within the plugin.
To clear the errors you will need to remove then replace
Zenject > Source > Usagefolder contents (containing the DLL) with the contents of
Zenject-master > AssemblyBuild > Zenject-usagewith is the source files.
Remove the DLL usage:
Move the source usage
Once this is done you can remove the
Zenject-masterfrom your project. You can also remove
The final step will be an invisible build error caused in Luna. This error is caused by a specific script called
CachedProvider.cs, and the pre-processor directives (
#endif), which can cause build errors in Luna.
To resolve the build compilation failure you should comment out all pre-processors from this script which will allow for a successful build.