| Instance< TScriptableObject, TArgument > |
| Instance< TScriptableObject, TArgument > |
| Instance< TScriptableObject, TFirstArgument, TSecondArgument > |
| Instance< TScriptableObject, TFirstArgument, TSecondArgument > |
| Instance< TScriptableObject, TFirstArgument, TSecondArgument, TThirdArgument > |
| Instance< TScriptableObject, TFirstArgument, TSecondArgument, TThirdArgument > |
| Instance< TScriptableObject, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument > |
| Instance< TScriptableObject, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument > |
| Instance< TScriptableObject, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument > |
| Instance< TScriptableObject, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument > |
| Instance< TScriptableObject, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument > |
| Instance< TScriptableObject, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument > |
|
◆ Instance< TScriptableObject, TArgument >() [2/2]
| static void Sisus.Init.Create.Instance< TScriptableObject, TArgument > |
( |
out TScriptableObject | instance, |
|
|
TArgument | argument ) |
|
static |
Creates an instance of ScriptableObject of type TScriptableObject and initializes it with the provided argument.
For classes that derive from ScriptableObject<TArgument> IInitializable<TArgument>.Init gets called at the beginning of the Awake event.
For classes that implement IInitializable<TArgument> IInitializable<TArgument>.Init is called at the end of initialization, after Awake and OnEnable but before Start.
Classes that implement IArgs<TArgument> can also manually acquire the dependency using the InitArgs.TryGet<TClient, TArgument> function during any stage of initialization, including the constructor - in which case it is even possible to assign the dependencies into readonly fields.
- Template Parameters
-
| TScriptableObject | Type of the ScriptableObject to create. |
- Parameters
-
| instance | When this method returns, contains the scriptable object of type TScriptableObject that was created. This parameter is passed uninitialized. |
| argument | The object that the created ScriptableObject depends on. |
- Exceptions
-
- Type Constraints
-
| TScriptableObject | : | ScriptableObject | |
| TScriptableObject | : | IArgs<TArgument> | |
|