prefab spawn unity in script code example
Example 1: Unity C# instantiate prefab
Instantiate(myPrefab, new Vector3(0, 0, 0), Quaternion.identity);
Example 2: how to add a gameobject
/// <summary>
/// Creates a new Gameobject called Name_1
/// </summary>
public void AddGameObject()
{
GameObject testObject = new GameObject("Name_1");
}