You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Spawns the object. Note that the Awake() and Start() will be called only once. OnDisable() and OnEnable() will be called insted,
/// since the method calls SetActive(true) on spawned Object;
/// </summary>
/// <returns>Instance from prefab</returns>
publicTSpawn<T>()whereT:Component
{
returnSpawn<T>(Vector3.zero);
}
/// <summary>
/// Spawns the object with desired position. Note that the Awake() and Start() will be called only once. OnDisable() and OnEnable() will be called insted,
/// since the method calls SetActive(true) on spawned Object;
/// </summary>
/// <param name="position">Position where the object shoul be spawned</param>
/// <returns>Instance from prefab</returns>
publicTSpawn<T>(Vector3position)whereT:Component
{
returnSpawn<T>(position,Quaternion.identity);
}
/// <summary>
/// Spawns the object with desired position and rotation. Note that the Awake() and Start() will be called only once. OnDisable() and OnEnable() will be called insted,
/// since the method calls SetActive(true) on spawned Object;
/// </summary>
/// <param name="position">Position where the object shoul be spawned</param>
/// <param name="rotation">Rotation of the spawned object</param>