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!
↧