Class GamePrefabs
Provides access to some useful prefabs of the game.
Namespace: Modding
Assembly: Assembly-CSharp.dll
Syntax
public class GamePrefabs : MonoBehaviour
Constructors
GamePrefabs()
Declaration
public GamePrefabs()
Properties
Instance
Declaration
public static GamePrefabs Instance { get; }
Property Value
Type | Description |
---|---|
GamePrefabs |
Methods
InstantiateExplosion(GamePrefabs.ExplosionType, Vector3, Quaternion, Transform)
Creates a new explosion game object of the given type.
Declaration
public static GameObject InstantiateExplosion(GamePrefabs.ExplosionType type, Vector3 position = null, Quaternion rotation = null, Transform parent = null)
Parameters
Type | Name | Description |
---|---|---|
GamePrefabs.ExplosionType | type | Explosion type. |
UnityEngine.Vector3 | position | Position of the new object. |
UnityEngine.Quaternion | rotation | Rotation of the new object. |
UnityEngine.Transform | parent | Parent of the new object. |
Returns
Type | Description |
---|---|
UnityEngine.GameObject | The created object. |
InstantiateProjectile(GamePrefabs.ProjectileType, Vector3, Quaternion, Transform)
Creates a new projectile game object of the given type.
Declaration
public static GameObject InstantiateProjectile(GamePrefabs.ProjectileType type, Vector3 position = null, Quaternion rotation = null, Transform parent = null)
Parameters
Type | Name | Description |
---|---|---|
GamePrefabs.ProjectileType | type | Projectile type. |
UnityEngine.Vector3 | position | Position of the new object. |
UnityEngine.Quaternion | rotation | Rotation of the new object. |
UnityEngine.Transform | parent | Parent of the new object. |
Returns
Type | Description |
---|---|
UnityEngine.GameObject | The created object. |