Init(args)
Scripting Reference
Loading...
Searching...
No Matches
Sisus.Init.IInitializable< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument > Interface Template Reference

Description

Represents an object which can be initialized using six arguments.

Object-derived classes that implement this interface can be instantiated with an argument using the InstantiateExtensions.Instantiate<TObject, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument>(TObject, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument) method.

MonoBehaviour-derived classes that implement this interface can also be added to a GameObject with an argument using the AddComponentExtensions.AddComponent<TComponent, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument>(GameObject, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument) method.

These functions can automatically inject the arguments using the IInitializable<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument>.Init function at the end of the initialization process; after the Awake and OnEnable events but before the Start event.

It is also possible for the object to receive the provided arguments at an earlier stage of its initialization process, such as in the constructor or during the Awake event, using InitArgs.TryGet<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument>.

See also
MonoBehaviour<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument>, ScriptableObject<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument>
Template Parameters
TFirstArgumentType of the first argument passed to the Init method.
TSecondArgumentType of the second argument passed to the Init method.
TThirdArgumentType of the third argument passed to the Init method.
TFourthArgumentType of the fourth argument passed to the Init method.
TFifthArgumentType of the fifth argument passed to the Init method.
TSixthArgumentType of the sixth argument passed to the Init method.
Inheritance diagram for Sisus.Init.IInitializable< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument >:
Sisus.Init.IArgs< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument > Sisus.Init.ISixArguments Sisus.Init.IFirstArgument< TFirstArgument > Sisus.Init.ISecondArgument< TSecondArgument > Sisus.Init.IThirdArgument< TThirdArgument > Sisus.Init.IFourthArgument< TFourthArgument > Sisus.Init.IFifthArgument< TFifthArgument > Sisus.Init.ISixthArgument< TSixthArgument > Sisus.Init.MonoBehaviour< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument > Sisus.Init.Requires< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument > Sisus.Init.ScriptableObject< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument > Sisus.Init.StateMachineBehaviour< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument >

Public Member Functions

void Init (TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument, TSixthArgument sixthArgument)
 Initializes the object with six objects that it depends on.
 
- Public Member Functions inherited from Sisus.Init.IArgs< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument >
void Validate (TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument, TSixthArgument sixthArgument)
 Validates the initialization arguments that were provided to this client.