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

◆ ValidateArgument< TArgument >()

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

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

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

protected override void ValidateArgument(IInputManager inputManager)
{
ThrowIfNull(inputManager);
}

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

protected override void ValidateArgument(IInputManager inputManager)
{
AssertNotNull(inputManager);
}

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

Parameters
argumentThe received argument to validate.