RandomiseNextEntry() producing same results

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Keeko
Posts: 33
Joined: Mon Feb 01, 2021 8:08 pm

RandomiseNextEntry() producing same results

Post by Keeko »

When I use RandomiseNextEntry() in the script field, the responses are random, but they are in the same order every time I start the game. It's like the seed hasn't been set.
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: RandomiseNextEntry() producing same results

Post by Tony Li »

Hi,

RandomizeNextEntry() calls UnityEngine.Random.Range().

Unity's Random class should set a random seed based on the system clock when play mode starts.

Something in your project may be setting it to the same seed every time. You can do a global search in your code editor for "Random.InitState".
Post Reply