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
TestType defines virtual method marked for injection. By default int is not registered, so Unity uses default value to invoke the method.
In derived type TestTypeDerived the method is overridden with different default value, but when resolved, default value from parent type is used.
The text was updated successfully, but these errors were encountered:
Invalid default value in overridden method parameters
Starting with Unity v5, parameters with default values are initialized with that value in case import can not be resolved.
Values in derived types
Consider the following example:
TestType
defines virtual method marked for injection. By defaultint
is not registered, so Unity uses default value to invoke the method.In derived type
TestTypeDerived
the method is overridden with different default value, but when resolved, default value from parent type is used.The text was updated successfully, but these errors were encountered: