I had to add UnityEngine before Random.Range for that function to work. So my random password line looks like this:
password = level1Passwords[UnityEngine.Random.Range(0, level1Passwords.Length)];
I had to add UnityEngine before Random.Range for that function to work. So my random password line looks like this:
password = level1Passwords[UnityEngine.Random.Range(0, level1Passwords.Length)];
This is becase there is a Random
class in the System
namespace also and without specifying which you want to use there is ambiguity.