This works:
using Zenject;
public class UiSignalInstaller : MonoInstaller
{
public override void InstallBindings()
{
Container.DeclareSignal();
Container.Bind().AsSingle().NonLazy();
}
}
public class RoomSelectionChangedSignal : Signal { }
This does not:
namespace Zenject.Installers.UI
{
public class UiSignalInstaller : MonoInstaller
{
public override void InstallBindings()
{
Container.DeclareSignal();
Container.Bind().AsSingle().NonLazy();
}
}
public class RoomSelectionChangedSignal : Signal { }
}
The library Zenject is placed under Plugins if this matters. I don't get a specific error warning, just "fix compiler issues" which is very unspecific. The only reason I found the solution is by trial-and-error.
I just realized there are tons of cases where the compiler is warning wrongly. Even if a variable is passed as parameter to a method. I am pretty sure this should not be the case.
↧