In the last weeks I made a game with a Procedural Map (full of Random.Ranges), now I want to “be able” to set or control the seed; The problem is that apparently when I use Random.Range, the seed changes while using it, and then turns back to the seed I wanted to have; This is making the game generate really weird Maps (like all straight corridors and 1 turn right), it’s practically breaking my game. If I don’t try setting the seed, I get normal random Maps (lots of rooms, corridors of any type etc…).
The Code is too long for you to read it, it would be useless, but I’m going to take a few important lines:
using UnityEngine;
using System.Collections;
public class StartGame : MonoBehaviour {
int randomSeedS;
// Use this for initialization
void Start () {
randomSeedS = (int)System.DateTime.Now.Ticks;
}
void Update () {
Random.seed = randomSeedS;
}
Then in another Script I wrote a code to show it in the game as a GUI.Label.
Is there any way for the seed to not be affected by Random.Range?