Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

You may want to look into Random.Range - https://docs.unity3d.com/ScriptReference/Random.Range.html

An example: spawnTime = Random.Range(1, 5); (This means, a random number will be generated that will range from 1 to 5, and assign it to spawnTime variable)

I'm not sure how the code would work depending on the game you're making, but if you're planning to have different spawnTime/spawnDelay values every after instantiation of an object, you can put the code just below the Instantiate() function call.