//Jimmy Vegas Unity Tutorials //This script is for simple generation using System.Collections; using System.Collections.Generic; using UnityEngine; public class SimpleRandom : MonoBehaviour { public GameObject theCrate; public GameObject theBin; public GameObject goldBar; public GameObject floorOne; public GameObject floorTwo; public int genObject; public int genFloor; void Start () { genObject = Random.Range(1, 4); genFloor = Random.Range(1, 3); if (genFloor == 1) { floorOne.SetActive(true); } if (genFloor == 2) { floorTwo.SetActive(true); } // generates object: if(genObject == 1) { theCrate.SetActive(true); } if (genObject == 2) { theBin.SetActive(true); } if (genObject == 3) { goldBar.SetActive(true); } } }