I'm trying to randomize a float but i keep getting this error, error CS0119; I've tried different ways but none seem to work. Can anyone help?
public float[] values;
void Start(){
values = new float[3];
values[1] = 5.0F;
values[2] = 6.0F;
values[3] = 7.0F;
text_form ();
foreach (float value in values)
{
print(value);
}
}
void text_form(){
values[UnityEngine.Random.Range(0, values.Length)]();
}
↧