Class PrefabExtensions
- Namespace
- Stride.CommunityToolkit.Engine
- Assembly
- Stride.CommunityToolkit.dll
Extension methods for Prefab.
public static class PrefabExtensions
- Inheritance
-
PrefabExtensions
Methods
Instantiate(Prefab, Vector3)
Instantiates a Prefab and a applies a transform to all the entites.
public static List<Entity> Instantiate(this Prefab prefab, Vector3 translation)
Parameters
prefabPrefabThe Prefab to instantiate.
translationVector3The Vector3 to translate the entities by.
Returns
Exceptions
- ArgumentException
If
prefabis null.
Instantiate(Prefab, Vector3, Quaternion)
Instantiates a Prefab and a applies a transform to all the entites.
public static List<Entity> Instantiate(this Prefab prefab, Vector3 translation, Quaternion rotation)
Parameters
prefabPrefabThe Prefab to instantiate.
translationVector3The Vector3 to translate the entities by.
rotationQuaternionThe Quaternion to rotate the entities by.
Returns
Exceptions
- ArgumentException
If
prefabis null.
Instantiate(Prefab, Vector3, Quaternion, Vector3)
Instantiates a Prefab and a applies a transform to all the entites.
public static List<Entity> Instantiate(this Prefab prefab, Vector3 translation, Quaternion rotation, Vector3 scale)
Parameters
prefabPrefabThe Prefab to instantiate.
translationVector3The Vector3 to translate the entities by.
rotationQuaternionThe Quaternion to rotate the entities by.
scaleVector3The Vector3 to scale the entities by.
Returns
Exceptions
- ArgumentException
If
prefabis null.
Instantiate(Prefab, Vector3, Vector3)
Instantiates a Prefab and a applies a transform to all the entites.
public static List<Entity> Instantiate(this Prefab prefab, Vector3 translation, Vector3 rotationEulerAngles)
Parameters
prefabPrefabThe Prefab to instantiate.
translationVector3The Vector3 to translate the entities by.
rotationEulerAnglesVector3The X, Y and Z rotations in euler angles to rotate the entities by.
Returns
Exceptions
- ArgumentException
If
prefabis null.
Instantiate(Prefab, Vector3, Vector3, Vector3)
Instantiates a Prefab and a applies a transform to all the entites.
public static List<Entity> Instantiate(this Prefab prefab, Vector3 translation, Vector3 rotationEulerAngles, Vector3 scale)
Parameters
prefabPrefabThe Prefab to instantiate.
translationVector3The Vector3 to translate the entities by.
rotationEulerAnglesVector3The X, Y and Z rotations in euler angles to rotate the entities by.
scaleVector3The Vector3 to scale the entities by.
Returns
Exceptions
- ArgumentException
If
prefabis null.
Instantiate(Prefab, ref Vector3)
Instantiates a Prefab and a applies a transform to all the entites.
public static List<Entity> Instantiate(this Prefab prefab, ref Vector3 translation)
Parameters
prefabPrefabThe Prefab to instantiate.
translationVector3The Vector3 to translate the entities by.
Returns
Exceptions
- ArgumentException
If
prefabis null.
Instantiate(Prefab, ref Vector3, ref Quaternion)
Instantiates a Prefab and a applies a transform to all the entites.
public static List<Entity> Instantiate(this Prefab prefab, ref Vector3 translation, ref Quaternion rotation)
Parameters
prefabPrefabThe Prefab to instantiate.
translationVector3The Vector3 to translate the entities by.
rotationQuaternionThe Quaternion to rotate the entities by.
Returns
Exceptions
- ArgumentException
If
prefabis null.
Instantiate(Prefab, ref Vector3, ref Quaternion, ref Vector3)
Instantiates a Prefab and a applies a transform to all the entites.
public static List<Entity> Instantiate(this Prefab prefab, ref Vector3 translation, ref Quaternion rotation, ref Vector3 scale)
Parameters
prefabPrefabThe Prefab to instantiate.
translationVector3The Vector3 to translate the entities by.
rotationQuaternionThe Quaternion to rotate the entities by.
scaleVector3The Vector3 to scale the entities by.
Returns
Exceptions
- ArgumentException
If
prefabis null.
Instantiate(Prefab, ref Vector3, ref Vector3)
Instantiates a Prefab and a applies a transform to all the entites.
public static List<Entity> Instantiate(this Prefab prefab, ref Vector3 translation, ref Vector3 rotationEulerAngles)
Parameters
prefabPrefabThe Prefab to instantiate.
translationVector3The Vector3 to translate the entities by.
rotationEulerAnglesVector3The X, Y and Z rotations in euler angles to rotate the entities by.
Returns
Exceptions
- ArgumentException
If
prefabis null.
Instantiate(Prefab, ref Vector3, ref Vector3, ref Vector3)
Instantiates a Prefab and a applies a transform to all the entites.
public static List<Entity> Instantiate(this Prefab prefab, ref Vector3 translation, ref Vector3 rotationEulerAngles, ref Vector3 scale)
Parameters
prefabPrefabThe Prefab to instantiate.
translationVector3The Vector3 to translate the entities by.
rotationEulerAnglesVector3The X, Y and Z rotations in euler angles to rotate the entities by.
scaleVector3The Vector3 to scale the entities by.
Returns
Exceptions
- ArgumentException
If
prefabis null.
InstantiateSingle(Prefab)
public static Entity InstantiateSingle(this Prefab prefab)
Parameters
Returns
Exceptions
- ArgumentException
If
prefabis null.- InvalidOperationException
If
prefabdoes not have exactly 1 Entity.
InstantiateSingle(Prefab, Vector3)
public static Entity InstantiateSingle(this Prefab prefab, Vector3 translation)
Parameters
prefabPrefabThe Prefab to instantiate.
translationVector3The Vector3 to translate the entity by.
Returns
Exceptions
- ArgumentException
If
prefabis null.- InvalidOperationException
If
prefabdoes not have exactly 1 Entity.
InstantiateSingle(Prefab, Vector3, Quaternion)
public static Entity InstantiateSingle(this Prefab prefab, Vector3 translation, Quaternion rotation)
Parameters
prefabPrefabThe Prefab to instantiate.
translationVector3The Vector3 to translate the entity by.
rotationQuaternionThe Quaternion to rotate the entity by.
Returns
Exceptions
- ArgumentException
If
prefabis null.- InvalidOperationException
If
prefabdoes not have exactly 1 Entity.
InstantiateSingle(Prefab, Vector3, Quaternion, Vector3)
public static Entity InstantiateSingle(this Prefab prefab, Vector3 translation, Quaternion rotation, Vector3 scale)
Parameters
prefabPrefabThe Prefab to instantiate.
translationVector3The Vector3 to translate the entity by.
rotationQuaternionThe Quaternion to rotate the entity by.
scaleVector3The Vector3 to scale the entity by.
Returns
Exceptions
- ArgumentException
If
prefabis null.- InvalidOperationException
If
prefabdoes not have exactly 1 Entity.
InstantiateSingle(Prefab, Vector3, Vector3)
public static Entity InstantiateSingle(this Prefab prefab, Vector3 translation, Vector3 rotationEulerAngles)
Parameters
prefabPrefabThe Prefab to instantiate.
translationVector3The Vector3 to translate the entity by.
rotationEulerAnglesVector3The X, Y and Z rotations in radians to rotate the entity by.
Returns
Exceptions
- ArgumentException
If
prefabis null.- InvalidOperationException
If
prefabdoes not have exactly 1 Entity.
InstantiateSingle(Prefab, Vector3, Vector3, Vector3)
public static Entity InstantiateSingle(this Prefab prefab, Vector3 translation, Vector3 rotationEulerAngles, Vector3 scale)
Parameters
prefabPrefabThe Prefab to instantiate.
translationVector3The Vector3 to translate the entity by.
rotationEulerAnglesVector3The X, Y and Z rotations in radians to rotate the entity by.
scaleVector3The Vector3 to scale the entity by.
Returns
Exceptions
- ArgumentException
If
prefabis null.- InvalidOperationException
If
prefabdoes not have exactly 1 Entity.
InstantiateSingle(Prefab, ref Vector3)
public static Entity InstantiateSingle(this Prefab prefab, ref Vector3 translation)
Parameters
prefabPrefabThe Prefab to instantiate.
translationVector3The Vector3 to translate the entity by.
Returns
Exceptions
- ArgumentException
If
prefabis null.- InvalidOperationException
If
prefabdoes not have exactly 1 Entity.
InstantiateSingle(Prefab, ref Vector3, ref Quaternion)
public static Entity InstantiateSingle(this Prefab prefab, ref Vector3 translation, ref Quaternion rotation)
Parameters
prefabPrefabThe Prefab to instantiate.
translationVector3The Vector3 to translate the entity by.
rotationQuaternionThe Quaternion to rotate the entity by.
Returns
Exceptions
- ArgumentException
If
prefabis null.- InvalidOperationException
If
prefabdoes not have exactly 1 Entity.
InstantiateSingle(Prefab, ref Vector3, ref Quaternion, ref Vector3)
public static Entity InstantiateSingle(this Prefab prefab, ref Vector3 translation, ref Quaternion rotation, ref Vector3 scale)
Parameters
prefabPrefabThe Prefab to instantiate.
translationVector3The Vector3 to translate the entity by.
rotationQuaternionThe Quaternion to rotate the entity by.
scaleVector3The Vector3 to scale the entity by.
Returns
Exceptions
- ArgumentException
If
prefabis null.- InvalidOperationException
If
prefabdoes not have exactly 1 Entity.
InstantiateSingle(Prefab, ref Vector3, ref Vector3)
public static Entity InstantiateSingle(this Prefab prefab, ref Vector3 translation, ref Vector3 rotationEulerAngles)
Parameters
prefabPrefabThe Prefab to instantiate.
translationVector3The Vector3 to translate the entity by.
rotationEulerAnglesVector3The X, Y and Z rotations in radians to rotate the entity by.
Returns
Exceptions
- ArgumentException
If
prefabis null.- InvalidOperationException
If
prefabdoes not have exactly 1 Entity.
InstantiateSingle(Prefab, ref Vector3, ref Vector3, ref Vector3)
public static Entity InstantiateSingle(this Prefab prefab, ref Vector3 translation, ref Vector3 rotationEulerAngles, ref Vector3 scale)
Parameters
prefabPrefabThe Prefab to instantiate.
translationVector3The Vector3 to translate the entity by.
rotationEulerAnglesVector3The X, Y and Z rotations in radians to rotate the entity by.
scaleVector3The Vector3 to scale the entity by.
Returns
Exceptions
- ArgumentException
If
prefabis null.- InvalidOperationException
If
prefabdoes not have exactly 1 Entity.