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

◆ TryGet< TClient, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument >() [1/2]

static bool Sisus.Init.InitArgs.TryGet< TClient, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument > ( Context context,
[DisallowNull] TClient client,
out TFirstArgument firstArgument,
out TSecondArgument secondArgument,
out TThirdArgument thirdArgument,
out TFourthArgument fourthArgument,
out TFifthArgument fifthArgument,
out TSixthArgument sixthArgument )
static

Retrieves arguments provided for the client object using the Set<TClient, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument> function.

When called in the context of the Reset event in edit mode and the TClient class has the the AutoInit attribute or a RequireComponent attribute for each argument it accepts, then the arguments can also be retrieved autonomously by this method using methods such as GetComponent and FindAnyObjectByType.

The client must implement the IArgs<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument> interface in order for it to be used with this function.

Template Parameters
TClientThe type of the client object.
TFirstArgumentThe type of the first argument.
TSecondArgumentThe type of the second argument.
TThirdArgumentThe type of the third argument.
TFourthArgumentThe type of the fourth argument.
TFifthArgumentThe type of the fifth argument.
TSixthArgumentThe type of the sixth argument.
Parameters
contextInitialization phase during which the method is being called.
clientThe object whose dependencies to retrieve.
firstArgumentThe first argument received, or default value if no stored argument was found.
secondArgumentThe second argument received, or default value if no stored argument was found.
thirdArgumentThe third argument received, or default value if no stored argument was found.
fourthArgumentThe fourth argument received, or default value if no stored argument was found.
fifthArgumentThe five argument received, or default value if no stored argument was found.
sixthArgumentThe sixth argument received, or default value if no stored argument was found.
Returns
true if arguments had been provided for the object; otherwise, false.
Exceptions
ArgumentNullExceptionThrown if client argument is null.
Type Constraints
TClient :IArgs 
TClient :TFirstArgument 
TClient :TSecondArgument 
TClient :TThirdArgument 
TClient :TFourthArgument 
TClient :TFifthArgument 
TClient :TSixthArgument