You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once creating game object for component via IInstantiator, like:
_instantiator.InstantiateComponent<MyComponent>(_executor, new object[] { task = task, onSuccess = onSuccess // <-- this is null });
ends with error indebug:
ZenjectException: Assert hit! Cannot include null values when creating a zenject argument list because zenject has no way of deducing the type from a null value. If you want to allow null, use the Explicit form.
what does the If you want to allow null, use the Explicit form actually means? Cannot find any official docs on it.
The text was updated successfully, but these errors were encountered:
you need to pass a List manually, since Zenject can't determine the contract type of null (using GetType()). So you need to use the _instantiator.InstantiateComponentExplicit<MyComponent>() method instead. And instead of using new object[] { ... } you need to use the more verbose strategy var args = new List<TypeValuePair>() { new TypeValuePair(typeof(TypeOfYourNullThing), null) } ;
Once creating game object for component via IInstantiator, like:
_instantiator.InstantiateComponent<MyComponent>(_executor, new object[] { task = task, onSuccess = onSuccess // <-- this is null });
ends with error indebug:
ZenjectException: Assert hit! Cannot include null values when creating a zenject argument list because zenject has no way of deducing the type from a null value. If you want to allow null, use the Explicit form.
what does the
If you want to allow null, use the Explicit form
actually means? Cannot find any official docs on it.The text was updated successfully, but these errors were encountered: