I'm using Zenject framework and I'm using multiple GameObject for a class but I don't know to do it using Zenject Container. Here's my code:
private GameObject _canvas;
private GameObject _mainWindow;
private GameObject _createAccountWindow;
void…
My Unity project is split into a Core project and several Modules, in different asmdef assembly definitions. Each module has an assembly reference to Core.
My Core installer looks like:
public class CoreInstaller : MonoInstaller
{
…
So I have a base class and some derived classes, I want to have just one factory with generic create method witch will create appropriate instances and inject all dependencies. Is this possible using Zenject?
Something…
I have a Unity + Zenject setup with a ProjectInstaller with some global dependencies that adhere to a "modal" interface, e.g.,
public class ProjectInstaller : MonoInstaller {
public override void InstallBindings() {
…
I'm facing a critical issue with syncing Zenject and StateMachine after dividing my game into multiple scenes. Previously, the game ran in a single scene with GRPC networking, but due to changes, I've removed GRPC and split the game into four…
I'm new to Zenject and this is my first project using this asset. I'm having injection problems! Maybe someone knows what I am doing wrong or where the error might be. In the code below, _spawnArea is not initialized.
public class BootstrapIniter :…
I am trying to learn how to work with Zenject's and unity and I have encountered a particular problem that I do not know if it has a possible solution solely using Zenject's api.
Let assume i have MethodA, MethodB and MethodC, and a SignalA.
Is it…
I'm trying to use Zenject in Unity. I have an interface and several implementations of it.
I want to inject with ID but also that the implementation will have the tick interface since it's not a MonoBehaviour.
So I have an IAttacker interface and a…
I want users to be able to create my ScriptableObject assets outside of play mode so they can bind them to their objects in the scene. Since I don't want Zenject creating the ScriptableObjects, a Factory solution is not what I'm looking for.…
I have a "Main" scene consisting of a softozor game object which is controlled by the player. It's a flappy dinosaur. As a child of that softozor game object, I have setup another game object, Installer, consisting of a Transform component and a…
I'm new to Dependency Injection and I have been doing my research for a few days now but can't seem to find answers; there is not a whole lot of examples out there specific to zenject so I have been looking into both specific zenject solutions as…
I am developing a platform for a videogame, it is pure c # code and I want to use Zenject for dependency injection. The idea is that this platform can initialize its dependency injection regardless of where it is being used. I have this class on the…
The Zenject documentation shows adding a component to a GameObject looking like:
However mine looks like:
How come mine appears to add a Collection of GameObjects rather than a single GameObject? I also show an Identifier whereas the example…
This is for Zenject being used with Unity.
I have a Project Context that holds a monoinstaller which should make bindings and the signalbus global, which works 99% of the time.
I have a Loading Scene and a Main Scene.
In the Loading Scene I have a…