![]() |
Init(args)
Scripting Reference
|
A base class for a component that can be used to specify the five arguments used to initialize a state machine behaviour of type TStateMachineBehaviour that implements IInitializable<TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument>.
The argument value can be assigned using the inspector and serialized as part of a scene or a prefab.
The argument gets injected to the TStateMachineBehaviour client during the Awake event.
The client receives the argument via the Init method where it can assign them to a member field or property.
After the argument has been injected the initializer is removed from theGameObject that holds it.
TStateMachineBehaviour | Type of the initialized state machine behaviour client. |
TFirstArgument | Type of the first argument to pass to the client's Init function. |
TSecondArgument | Type of the second argument to pass to the client's Init function. |
TThirdArgument | Type of the third argument to pass to the client's Init function. |
TFourthArgument | Type of the fourth argument to pass to the client's Init function. |
TFifthArgument | Type of the fifth argument to pass to the client's Init function. |
TStateMachineBehaviour | : | StateMachineBehaviour | |
TStateMachineBehaviour | : | IInitializable | |
TStateMachineBehaviour | : | TFirstArgument | |
TStateMachineBehaviour | : | TSecondArgument | |
TStateMachineBehaviour | : | TThirdArgument | |
TStateMachineBehaviour | : | TFourthArgument | |
TStateMachineBehaviour | : | TFifthArgument |
Additional Inherited Members | |
![]() | |
new TClient | InitTarget () |
Initializes the client object of type TClient with the arguments specified by this initializer. | |
new System.Threading.Tasks.Task< TClient > | InitTargetAsync () |
Initializes the client object of type TClient asynchronously with the arguments specified by this initializer. | |
![]() | |
bool | TargetIsAssignableOrConvertibleToType (Type type) |
Gets a value indicating whether an object of the given type can be assigned to the Target property directly, or if type implements IValueProvider<T>, IValueByTypeProvider or IValueByTypeProviderAsync. | |
![]() | |
override TStateMachineBehaviour | InitTarget ([DisallowNull] Animator target) |
virtual void | OnReset (ref TFirstArgument firstArgument, ref TSecondArgument secondArgument, ref TThirdArgument thirdArgument, ref TFourthArgument fourthArgument, ref TFifthArgument fifthArgument) |
Resets the Init arguments to their default values. | |
![]() | |
TFirstArgument | FirstArgument [get, set] |
The first argument passed to the TStateMachineBehaviour client's Init function. | |
TSecondArgument | SecondArgument [get, set] |
The second argument passed to the TStateMachineBehaviour client's Init function. | |
TThirdArgument | ThirdArgument [get, set] |
The third argument passed to the TStateMachineBehaviour client's Init function. | |
TFourthArgument | FourthArgument [get, set] |
The fourth argument passed to the TStateMachineBehaviour client's Init function. | |
TFifthArgument | FifthArgument [get, set] |
The fifth argument passed to the TStateMachineBehaviour client's Init function. | |
![]() | |
Object | Target [get, set] |
Existing target instance to initialize, if any. | |
bool | ProvidesCustomInitArguments [get] |
Gets a value indicating whether this initializer is able to provide custom per-instance Init arguments for its client. | |