Question by
SrGonzalez · Oct 14, 2016 at 05:12 PM ·
randomfloatrandom.rangevaluerange
PLEASE TELL ME WHAT IS WRONG HERE I RECIEVE THIS ERROR
public float num;
void Start ()
{
num = Random.Range(1F, 2F);
}
ERROR IN VISUAL STUDIO: 'GRASSAUDIO.Random()' is a method, which is not valid in the given context
Comment
Answer by doublemax · Oct 14, 2016 at 05:30 PM
There seems to be a conflict with another namespace.
Try this:
num = UnityEngine.Random.Range(1F, 2F);
Your answer
Follow this Question
Related Questions
the floats wont be applied, Random.Range 1 Answer
Random.Range code problem or problem with Unity? 1 Answer
how to randomly instantiate prefabs but each with it's own probability? 2 Answers
Can I generate values outside of the Random.insideUnitCircle?? 1 Answer
Random.value for each GameObject. 1 Answer