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

Description

Represents an object which can receive two 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> function.

MonoBehaviour-derived classes that implement this interface can be added to a GameObject AddComponent function.

If the class also implements IInitializable<TFirstArgument, TSecondArgument> then these functions can automatically inject the dependency to the IInitializable<TFirstArgument, TSecondArgument>.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>, 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>.

See also
IInitializable<TFirstArgument, TSecondArgument>, MonoBehaviour<TFirstArgument, TSecondArgument>, ScriptableObject<TFirstArgument, TSecondArgument>
Template Parameters
TFirstArgumentType of the first argument.
TSecondArgumentType of the second argument.
Inheritance diagram for Sisus.Init.IArgs< TFirstArgument, TSecondArgument >:
Sisus.Init.ITwoArguments Sisus.Init.IFirstArgument< TFirstArgument > Sisus.Init.ISecondArgument< TSecondArgument > Sisus.Init.IInitializable< TFirstArgument, TSecondArgument > Sisus.Init.MonoBehaviour< TFirstArgument, TSecondArgument > Sisus.Init.Requires< TFirstArgument, TSecondArgument > Sisus.Init.ScriptableObject< TFirstArgument, TSecondArgument > Sisus.Init.StateMachineBehaviour< TFirstArgument, TSecondArgument >

Public Member Functions

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