Init(args)
Scripting Reference
List of all members | Public Member Functions | Static Public Member Functions
Sisus.Init.GameObject< TFirstComponent, TSecondComponent, TThirdComponent > Struct Template Reference

Description

Builder for creating a new GameObject with a component of type TComponent .

Builder for creating a new GameObject with three components.

Builder for creating a new GameObject with two components.

The component must be initialized by calling an Init function with arguments matching the argument list defined by the IArgs interface that TComponent implements.

If TComponent does not implement any IArgs interface then the parameterless Init function should be used.

The new GameObject is first created in an inactive state and only activated once the component has been initialized. This ensures that the Awake and OnEnable events for the component are only called after the component has received all its dependencies.

Template Parameters
TComponentType of the added component.

The components must be initialized by first calling an Init1 function with arguments matching the argument list defined by the IArgs interface that TFirstComponent implements and then calling an Init2 function with arguments matching the argument list defined by the IArgs interface that TSecondComponent implements.

If neither component implements any IArgs interfaces then a single call to the parameterless Init function can be used to initialize both components.

The new GameObject is first created in an inactive state and only activated once both components have been initialized. This ensures that the Awake and OnEnable events for the components are only called after both components have received all their dependencies.

Template Parameters
TFirstComponentType of the first added component.
TSecondComponentType of the second added component.

The components must be initialized by first calling an Init1 function with arguments matching the argument list defined by the IArgs interface that TFirstComponent implements and then calling an Init2 function with arguments matching the argument list defined by the IArgs interface that TSecondComponent implements and then calling an Init3 function with arguments matching the argument list defined by the IArgs interface that TThirdComponent implements.

If none of the three components implements any IArgs interfaces then a single call to the parameterless Init function can be used to initialize all components.

The new GameObject is first created in an inactive state and only activated once all three components have been initialized. This ensures that the Awake and OnEnable events for the components are only called after both components have received all their dependencies.

Template Parameters
TFirstComponentType of the first added component.
TSecondComponentType of the second added component.
TThirdComponentType of the third added component.
Type Constraints
TFirstComponent :Component 
TSecondComponent :Component 
TThirdComponent :Component 

Public Member Functions

 GameObject (string name)
 Starts the process of creating a new GameObject with a component of type TComponent . More...
 
 GameObject (string name, Transform parent, bool active=true)
 Starts the process of creating a new GameObject with a component of type TComponent . More...
 
 GameObject (string name, bool active)
 Starts the process of creating a new GameObject with a component of type TComponent . More...
 
 GameObject (bool active)
 Starts the process of creating a new GameObject with a component of type TComponent . More...
 
 GameObject (Transform parent, bool active=true)
 Starts the process of creating a new GameObject with a component of type TComponent . More...
 
 GameObject (Transform parent, Vector3 position, bool positionInWorldSpace=false, bool active=true)
 Starts the process of creating a new GameObject with a component of type TComponent . More...
 
 GameObject (Transform parent, Vector3 position, Quaternion rotation, bool inWorldSpace=false, bool active=true)
 Starts the process of creating a new GameObject with a component of type TComponent . More...
 
 GameObject (Transform parent, Vector3 position, Quaternion rotation, Vector3 scale, bool inWorldSpace=false, bool active=true)
 Starts the process of creating a new GameObject with a component of type TComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Vector3 eulerAngles, bool inWorldSpace=false)
 Starts the process of creating a new GameObject with a component of type TComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Vector3 eulerAngles, bool inWorldSpace, bool active)
 Starts the process of creating a new GameObject with a component of type TComponent . More...
 
 GameObject (Transform parent, Vector3 position, Vector3 eulerAngles, Vector3 scale, bool inWorldSpace=false, bool active=true)
 Starts the process of creating a new GameObject with a component of type TComponent . More...
 
 GameObject (Vector3 position, bool active=true)
 Starts the process of creating a new GameObject with a component of type TComponent . More...
 
 GameObject (string name, Vector3 position, bool active=true)
 Starts the process of creating a new GameObject with a component of type TComponent . More...
 
 GameObject ([NotNull] GameObject original)
 Starts the process of cloning the original GameObject with a component of type TComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent)
 Starts the process of cloning the original GameObject with a component of type TComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, bool active)
 Starts the process of cloning the original GameObject with a component of type TComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, bool positionInWorldSpace=false)
 Starts the process of cloning the original GameObject with a component of type TComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, bool positionInWorldSpace, bool active)
 Starts the process of cloning the original GameObject with a component of type TComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Quaternion rotation, bool inWorldSpace=false)
 Starts the process of cloning the original GameObject with a component of type TComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Quaternion rotation, bool inWorldSpace, bool active)
 Starts the process of cloning the original GameObject with a component of type TComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Quaternion rotation, Vector3 scale, bool inWorldSpace=false)
 Starts the process of cloning the original GameObject with a component of type TComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Quaternion rotation, Vector3 scale, bool inWorldSpace, bool active)
 Starts the process of cloning the original GameObject with a component of type TComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Vector3 eulerAngles, Vector3 scale, bool inWorldSpace=false)
 Starts the process of cloning the original GameObject with a component of type TComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Vector3 eulerAngles, Vector3 scale, bool inWorldSpace, bool active)
 Starts the process of cloning the original GameObject with a component of type TComponent . More...
 
 GameObject (string name)
 Starts the process of creating a new GameObject with components of type TFirstComponent and TSecondComponent . More...
 
 GameObject (string name, bool active)
 
 GameObject (string name, Transform parent, bool active=true)
 Starts the process of creating a new GameObject with components of type TFirstComponent and TSecondComponent . More...
 
 GameObject (bool active)
 Starts the process of creating a new GameObject with components of type TFirstComponent and TSecondComponent . More...
 
 GameObject (Transform parent, bool active=true)
 Starts the process of creating a new GameObject with components of type TFirstComponent and TSecondComponent . More...
 
 GameObject (Transform parent, Vector3 position, bool positionInWorldSpace=false, bool active=true)
 Starts the process of creating a new GameObject with components of type TFirstComponent and TSecondComponent . More...
 
 GameObject (Transform parent, Vector3 position, Quaternion rotation, bool inWorldSpace=false, bool active=true)
 Starts the process of creating a new GameObject with components of type TFirstComponent and TSecondComponent . More...
 
 GameObject (Transform parent, Vector3 position, Quaternion rotation, Vector3 scale, bool inWorldSpace=false, bool active=true)
 Starts the process of creating a new GameObject with components of type TFirstComponent and TSecondComponent . More...
 
 GameObject (Transform parent, Vector3 position, Vector3 eulerAngles, Vector3 scale, bool inWorldSpace=false, bool active=true)
 Starts the process of creating a new GameObject with components of type TFirstComponent and TSecondComponent . More...
 
 GameObject (Vector3 position, bool active=true)
 Starts the process of creating a new GameObject with components of type TFirstComponent and TSecondComponent . More...
 
 GameObject (string name, Vector3 position, bool active=true)
 Starts the process of creating a new GameObject with components of type TFirstComponent and TSecondComponent . More...
 
 GameObject ([NotNull] GameObject original)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent and TSecondComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent and TSecondComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, bool active)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent and TSecondComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, bool positionInWorldSpace=false)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent and TSecondComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, bool positionInWorldSpace, bool active)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent and TSecondComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Quaternion rotation, bool inWorldSpace=false)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent and TSecondComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Quaternion rotation, bool inWorldSpace, bool active)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent and TSecondComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Quaternion rotation, Vector3 scale, bool inWorldSpace=false)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent and TSecondComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Quaternion rotation, Vector3 scale, bool inWorldSpace, bool active)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent and TSecondComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Vector3 eulerAngles, bool inWorldSpace=false)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent and TSecondComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Vector3 eulerAngles, bool inWorldSpace, bool active)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent and TSecondComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Vector3 eulerAngles, Vector3 scale, bool inWorldSpace=false)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent and TSecondComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Vector3 eulerAngles, Vector3 scale, bool inWorldSpace, bool active)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent and TSecondComponent . More...
 
 GameObject (string name)
 Starts the process of creating a new GameObject with components of type TFirstComponent and TSecondComponent . More...
 
 GameObject (string name, bool active)
 
 GameObject (string name, Transform parent, bool active=true)
 Starts the process of creating a new GameObject with components of type TFirstComponent and TSecondComponent . More...
 
 GameObject (bool active)
 Starts the process of creating a new GameObject with components of type TFirstComponent and TSecondComponent . More...
 
 GameObject (Transform parent, bool active=true)
 Starts the process of creating a new GameObject with components of type TFirstComponent and TSecondComponent . More...
 
 GameObject (Transform parent, Vector3 position, bool positionInWorldSpace=false, bool active=true)
 Starts the process of creating a new GameObject with components of type TFirstComponent and TSecondComponent . More...
 
 GameObject (Transform parent, Vector3 position, Quaternion rotation, bool inWorldSpace=false, bool active=true)
 Starts the process of creating a new GameObject with components of type TFirstComponent and TSecondComponent . More...
 
 GameObject (Transform parent, Vector3 position, Quaternion rotation, Vector3 scale, bool inWorldSpace=false, bool active=true)
 Starts the process of creating a new GameObject with components of type TFirstComponent and TSecondComponent . More...
 
 GameObject (Transform parent, Vector3 position, Vector3 eulerAngles, Vector3 scale, bool inWorldSpace=false, bool active=true)
 Starts the process of creating a new GameObject with components of type TFirstComponent and TSecondComponent . More...
 
 GameObject (Vector3 position, bool active=true)
 Starts the process of creating a new GameObject with components of type TFirstComponent and TSecondComponent . More...
 
 GameObject (string name, Vector3 position, bool active=true)
 Starts the process of creating a new GameObject with components of type TFirstComponent and TSecondComponent . More...
 
 GameObject ([NotNull] GameObject original)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent , TSecondComponent and TThirdComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent , TSecondComponent and TThirdComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, bool active)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent , TSecondComponent and TThirdComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, bool positionInWorldSpace=false)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent , TSecondComponent and TThirdComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, bool positionInWorldSpace, bool active)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent , TSecondComponent and TThirdComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Quaternion rotation, bool inWorldSpace=false)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent , TSecondComponent and TThirdComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Quaternion rotation, bool inWorldSpace, bool active)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent , TSecondComponent and TThirdComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Quaternion rotation, Vector3 scale, bool inWorldSpace=false)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent , TSecondComponent and TThirdComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Quaternion rotation, Vector3 scale, bool inWorldSpace, bool active)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent , TSecondComponent and TThirdComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Vector3 eulerAngles, bool inWorldSpace=false)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent , TSecondComponent and TThirdComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Vector3 eulerAngles, bool inWorldSpace, bool active)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent , TSecondComponent and TThirdComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Vector3 eulerAngles, Vector3 scale, bool inWorldSpace=false)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent , TSecondComponent and TThirdComponent . More...
 
 GameObject ([NotNull] GameObject original, Transform parent, Vector3 position, Vector3 eulerAngles, Vector3 scale, bool inWorldSpace, bool active)
 Starts the process of cloning the original GameObject with a component of type TFirstComponent , TSecondComponent and TThirdComponent . Starts the process of cloning the original GameObject with a component of type
TFirstComponent , TSecondComponent and TThirdComponent . More...
 

Static Public Member Functions

static implicit operator GameObject (GameObject< TComponent > @this)
 Gets the GameObject to which the component is added. More...
 
static implicit operator Transform (GameObject< TComponent > @this)
 Gets the Transform component of the GameObject to which the component is added. More...
 
static implicit operator TComponent (GameObject< TComponent > @this)
 Gets the component that is added to the GameObject. More...
 
static implicit operator GameObject (GameObject< TFirstComponent, TSecondComponent > @this)
 Gets the GameObject to which the components are added. More...
 
static implicit operator Transform (GameObject< TFirstComponent, TSecondComponent > @this)
 Gets the Transform component of the GameObject to which the components are added. More...
 
static implicit operator TFirstComponent (GameObject< TFirstComponent, TSecondComponent > @this)
 Gets the first component added to the GameObject. More...
 
static implicit operator TSecondComponent (GameObject< TFirstComponent, TSecondComponent > @this)
 Gets the second component added to the GameObject. More...
 
static implicit operator (TFirstComponent, TSecondComponent)(GameObject< TFirstComponent
 Gets a tuple containing the two components added to the GameObject. More...
 
static implicit operator GameObject (GameObject< TFirstComponent, TSecondComponent, TThirdComponent > @this)
 Gets the GameObject to which the components are added. More...
 
static implicit operator Transform (GameObject< TFirstComponent, TSecondComponent, TThirdComponent > @this)
 Gets the Transform component of the GameObject to which the components are added. More...
 
static implicit operator TFirstComponent (GameObject< TFirstComponent, TSecondComponent, TThirdComponent > @this)
 Gets the first component added to the GameObject. More...
 
static implicit operator TSecondComponent (GameObject< TFirstComponent, TSecondComponent, TThirdComponent > @this)
 Gets the second component added to the GameObject. More...
 
static implicit operator TThirdComponent (GameObject< TFirstComponent, TSecondComponent, TThirdComponent > @this)
 Gets the third component added to the GameObject. More...
 
static implicit operator (TFirstComponent, TSecondComponent, TThirdComponent)(GameObject< TFirstComponent
 Gets a tuple containing the three components added to the GameObject. More...