Init(args)
Scripting Reference
Loading...
Searching...
No Matches
Sisus.Init.WrapperInitializer< TWrapper, TWrapped, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument > Class Template Referenceabstract

Description

A base class for a component that can specify the six constructor arguments used to initialize a plain old class object which then gets wrapped by a Wrapper<TWrapped> component.

The argument values can be assigned using the inspector and serialized as part of a scene or a prefab.

The TWrapped wrapped object gets created and injected to the TWrapper wrapper component during the Awake event.

After the object has been injected the WrapperInitializer<,,,,,,,> is removed from the GameObject that holds it.

Template Parameters
TWrapperType of the initialized wrapper component.
TWrappedType of the object wrapped by the wrapper.
TFirstArgumentType of the first argument passed to the wrapped object's constructor.
TSecondArgumentType of the second argument passed to the wrapped object's constructor.
TThirdArgumentType of the third argument passed to the wrapped object's constructor.
TFourthArgumentType of the fourth argument passed to the wrapped object's constructor.
TFifthArgumentType of the fifth argument passed to the wrapped object's constructor.
TSixthArgumentType of the sixth argument passed to the wrapped object's constructor.
Type Constraints
TWrapper :Wrapper<TWrapped> 
Inheritance diagram for Sisus.Init.WrapperInitializer< TWrapper, TWrapped, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument >:
Sisus.Init.WrapperInitializerBase< TWrapper, TWrapped, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument > Sisus.Init.IInitializer< TClient, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument > Sisus.Init.IInitializable Sisus.Init.IInitializer< TClient > Sisus.Init.IValueProvider< TValue > Sisus.Init.IValueByTypeProvider Sisus.Init.IInitializer< TClient > Sisus.Init.IInitializer Sisus.Init.IValueProvider Sisus.Init.IInitializer

Properties

override TFirstArgument FirstArgument [get, set]
 
override TSecondArgument SecondArgument [get, set]
 
override TThirdArgument ThirdArgument [get, set]
 
override TFourthArgument FourthArgument [get, set]
 
override TFifthArgument FifthArgument [get, set]
 
override TSixthArgument SixthArgument [get, set]
 
- Properties inherited from Sisus.Init.WrapperInitializerBase< TWrapper, TWrapped, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument >
TFirstArgument FirstArgument [get, set]
 The first argument used to initialize the wrapped object.
 
TSecondArgument SecondArgument [get, set]
 The second argument used to initialize the wrapped object.
 
TThirdArgument ThirdArgument [get, set]
 The third argument used to initialize the wrapped object.
 
TFourthArgument FourthArgument [get, set]
 The fourth argument used to initialize the wrapped object.
 
TFifthArgument FifthArgument [get, set]
 The fifth argument used to initialize the wrapped object.
 
TSixthArgument SixthArgument [get, set]
 The sixth argument used to initialize the wrapped object.
 
- 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.WrapperInitializerBase< TWrapper, TWrapped, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument >
override TWrapper InitTarget ([AllowNull] TWrapper wrapper)
 
TWrapped CreateWrappedObject (TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument, TSixthArgument sixthArgument)
 Creates a new instance of TWrapped initialized using the provided arguments and returns it.