I have this script attached to an empty gameobject.
using UnityEngine;
using System.Collections;
public class buildingcreator : MonoBehaviour
{
public GameObject building;
void start ()
{
Instantiate (building);
}
}
I’ve set the prefab that will be instantiated in the inspector (the building variable) but when i run the game nothing happens. the prefab doesn’t appear.
whats wrong with the code?