Here is my current code. Forgive me if the post formatting is wrong, it the first time I am posting. the Prefab spawns after 50 seconds, however I get this Error. Also the prefab does not play its animation when it spawns. I am 100% a beginner scripter. Thank you for any help!
UnassignedReferenceException: The variable Boss of BossSpawn has not been assigned.
You probably need to assign the Boss variable of the BossSpawn script in the inspector.
UnityEngine.Object.Internal_InstantiateSingle (UnityEngine.Object data, Vector3 pos, Quaternion rot)
using UnityEngine;
using System.Collections;
public class BossSpawn : MonoBehaviour
{
public GameObject Boss;
GameObject bossClone;
void Start ()
{
StartCoroutine(WaitSpawner());
}
IEnumerator WaitSpawner()
{
yield return new WaitForSeconds(50f);
Debug.Log("it has been 50sec");
bossClone = Instantiate(Boss, transform.position, Quaternion.identity) as GameObject;
}
void Update () {
}
}