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

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

static bool Sisus.Init.InitArgs.TryGet< TClient, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument > ( this TClient client,
Context context = Context::MainThread )
static

Acquire the eight services that the depends on and pass them to its IInitializable<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument>.Init method.

Parameters
clientThe object to initialize. It must implement IInitializable<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument>.
contextThe context from which a method is being called.

Many objects that implement IInitializable are only able to acquire their own dependencies when Context.EditMode or Context.Reset is used in Edit Mode. For performance and reliability reasons it is recommended to do these operations in Edit Mode only, and cache the results.

Returns
true if was able to locate all dependencies and initialize the client with them; otherwise, false.
Type Constraints
TClient :IInitializable 
TClient :TFirstArgument 
TClient :TSecondArgument 
TClient :TThirdArgument 
TClient :TFourthArgument 
TClient :TFifthArgument 
TClient :TSixthArgument 
TClient :TSeventhArgument 
TClient :TEighthArgument