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

◆ ThrowIfNull() [2/2]

static void Sisus.NullExtensions.ThrowIfNull ( object reference,
string exceptionMessage,
Type type )
static

Throws an ArgumentNullException if reference is null or a destroyed Object.

This method will only execute in the editor and in development builds; all calls made to this method will be completely stripped out of release builds.

Parameters
referenceObject to guard against being null.
exceptionMessageException message to show in the Console if reference is null.

If the message contains "{0}" then that will be replaced with the name of the provided type .

Parameters
typeType information to include in the message.
Exceptions
ArgumentNullException