Horje
unity C# instantiate prefab Code Example
unity instantiate prefab
Instantiate(cube, Vector3 (x, y, 0), Quaternion.identity);
unity C# instantiate prefab
GameObject prefab = reference_to_your_prefab_asset;
Vector3 position = Vector3.zero;
Quaternion rotation = Quaternion.identity;
Transform parent = parent_of_instantiated_prefab;

Instantiate(prefab, position, rotation, parent);
instantiate prefab unity
using UnityEngine;
using System.Collections;

public class Instantiate_example : MonoBehaviour 
{ 
  public Transform prefab;
  void Start() 
  { 
     Instantiate(prefab, new Vector3(2.0F, 0, 0), Quaternion.identity);
  } 
}




Csharp

Related
check variable is empty powershell Code Example check variable is empty powershell Code Example
how to make infinite loop in c# Code Example how to make infinite loop in c# Code Example
enum c# Code Example enum c# Code Example
basic auth swagger .net core 5 Code Example basic auth swagger .net core 5 Code Example
remove duplicate characters in a string C# Code Example remove duplicate characters in a string C# Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10