Noticias

¡RECUERDA QUE SI ERES UN NUEVO USUARIO, DEBES PRESENTARTE PARA PODER PUBLICAR MENSAJES! | TENEMOS CANAL OFICIAL DE TELEGRAM: t.me/unity3dspain

Random.seed

Iniciado por luis alejandro, Marzo 04, 2016, 04:58:58 AM

Tema anterior - Siguiente tema
Marzo 04, 2016, 04:58:58 AM Ultima modificación: Junio 10, 2016, 03:12:25 AM por pioj
Hola ,alguien me podria enseñar algun ejemplo de como utilizar Random.seed?
 
e estado leyendo e hice pruevas ,digamos la seed afecta a los random.range,estableci una semilla luego imprime unos randon.range y me salia lo mismo de cada uno,es asi como funciona o hay otras maneras?
 
 
 



   
          void Start () {
              Random.seed = 12345;
              Debug.Log(Random.Range(0,10)); //6
              Debug.Log(Random.Range(0,10));//6
              Debug.Log(Random.Range(0,10)); //9
              Debug.Log(Random.Range(0,10));//0
          }
   

[/quote]
 
 

Etiquetas: