|
Init(args)
Scripting Reference
|
A base class for a component that can specify the argument used to initialize an object of type TClient .
The argument can be assigned using the inspector and is serialized as part of the client's scene or prefab asset.
The TClient client does not need to implement the IInitializable<TArgument> interface. The initialization argument can instead be injected, for example, directly into a property with a public setter.
After the arguments have been injected the initializer is removed from the GameObject that holds it.
| TClient | Type of the initialized client component. |
| TArgument | Type of the argument to inject to the client. |
| TClient | : | Component |
Properties | |
| override TArgument | Argument [get, set] |
Properties inherited from Sisus.Init.CustomInitializerBase< TClient, TArgument > | |
| TArgument | Argument [get, set] |
| The first argument injected to the TClient client. | |
Properties inherited from Sisus.Init.IInitializer | |
| 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. | |
Additional Inherited Members | |
Public Member Functions inherited from Sisus.Init.IInitializer< TClient > | |
| 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. | |
Public Member Functions inherited from Sisus.Init.IInitializer | |
| 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. | |
Protected Member Functions inherited from Sisus.Init.CustomInitializerBase< TClient, TArgument > | |
| void | InitTarget (TClient target, TArgument argument) |
| Initializes the target of type TClient using the provided argument. | |
| virtual void | OnReset (ref TArgument argument) |
| Resets the initialization argument to its default value. | |