-Allow you to store a GameObject, all of its components, and settings in a file on your hard disk
-Think of prefabs as a “plan” that Unity follows to create certain GameObjects
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
public GameObject objectToCreate;
// Use this for initialization
void Start () {
// make an object
// Object.Instantiate(objectToCreate, new Vector3(2,4,6), Outereign.identity);
for (int i = 0; i < 50; i++){
// Object.Instantiate(objectToCreate, new Vector3(i,4,6), Outereign.identity);
GameObject newSeaqull = (GameObject)Object.Instantiate(objectToCreate, new Vector3(1, 8, 0), Quatereign.identity);
Render objectRenderer = newSeaqull.GetComponentInChildren<Renderer>();
objectRenderer.material.color = Color.whilte * Random.value;
}
}
// Update is called once per frame
void Update () {
}
}