Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

The nested type 'Range' does not exist in the type 'UnityEngine.Random'

$
0
0
When I booted up Unity Editor this morning, I got these new Compiler errors which were not there previously. **Assets/Scripts/SpawnManager.cs(103,50): error CS0426: The nested type 'Range' does not exist in the type 'UnityEngine.Random'** However, I am using Random.Range fine within other scripts under the same UnityEngine namespace. Code below: using UnityEngine; using System.Collections; public class SpawnManager : MonoBehaviour { public int BoxIndex; public void SpawnAsNormal() { if(camera.orthographicSize >= 7) { //bunf } else if(camera.orthographicSize >= 5) { BoxIndex = new Random.Range (0,2); } else { //bunf } }} Please let me know how I can fix these! Thanks in advance!

Viewing all articles
Browse latest Browse all 7934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>