Init(args)
Scripting Reference
Loading...
Searching...
No Matches

◆ ValidateArgument()

virtual void Sisus.Init.ScriptableObject< TArgument >.ValidateArgument ( TArgument argument)
protectedvirtual

Method that can be overridden and used to validate the initialization argument that was received by this object.

You can use the ThrowIfNull method to throw an ArgumentNullException if the argument is null.

protected override void ValidateArgument(IInputManager inputManager)
{
ThrowIfNull(inputManager);
}
virtual void ValidateArgument(TArgument argument)
Method that can be overridden and used to validate the initialization argument that was received by t...
Definition ScriptableObjectT1.cs:346
void ThrowIfNull(TArgument argument)
Checks if the argument is null and throws an ArgumentNullException if it is.
Definition ScriptableObjectT1.cs:381

You can use the AssertNotNull method to log an assertion to the Console if the argument is null.

protected override void ValidateArgument(IInputManager inputManager)
{
AssertNotNull(inputManager);
}
void AssertNotNull(TArgument argument)
Checks if the argument is null and logs an assertion message to the console if it is.
Definition ScriptableObjectT1.cs:396

Calls to this method are ignored in non-development builds.

Parameters
argumentThe received argument to validate.