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

Description

Represents an object which can receive four arguments as part of its initialization process.

UnityEngine.Object-derived classes that implement this interface can be instantiated with their dependency using the InstantiateExtensions.Instantiate<TObject, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument> function.

MonoBehaviour-derived classes that implement this interface can be added to a GameObject with their dependency using the AddComponent function.

If the class also implements IInitializable<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument> then these functions can automatically inject the dependency to the IInitializable<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument>.Init function at the end of the initialization process; after the Awake and OnEnable events but before the Start event.

If the class does not implement IInitializable<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument>, or if you you would like to retrieve the dependency at an earlier stage of the initialization process, you can use InitArgs.TryGet<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument>.

See also
IInitializable<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument>, MonoBehaviour<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument>, ScriptableObject<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument>
Template Parameters
TFirstArgumentType of the first argument.
TSecondArgumentType of the second argument.
TThirdArgumentType of the third argument.
TFourthArgumentType of the fourth argument.
Inheritance diagram for Sisus.Init.IArgs< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument >:
Sisus.Init.IFourArguments Sisus.Init.IFirstArgument< TFirstArgument > Sisus.Init.ISecondArgument< TSecondArgument > Sisus.Init.IThirdArgument< TThirdArgument > Sisus.Init.IFourthArgument< TFourthArgument > Sisus.Init.IInitializable< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument > Sisus.Init.MonoBehaviour< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument > Sisus.Init.Requires< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument > Sisus.Init.ScriptableObject< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument > Sisus.Init.StateMachineBehaviour< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument >

Public Member Functions

void Validate (TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument)
 Validates the initialization arguments that were provided to this client.