Hello, I want to spawn objects in a random position. I googled for help and I all I found is the code System.Random.Next( , ). But I don’t know how to use this code, so that it gives a random value to a variable.
I tried:
public class Zufall : MonoBehaviour{
void Start () { Random rnd = new Random();
System.Random.Next(0,10);}
void Update () {}
}
get the Compilerfehler CS0120 (needed Object Referenc for System.Randeom.Next()). Can anyone please help me to include the “rnd” variable in this code, so that it works?[/URL][/SIZE]