Hi guys!
First of all, sorry for my bad english.
I’m creating an endless Runner. I followed this tutorial Runner, a Unity C# Tutorial
Now I want to generate the track with a number of different level tiles, which randomly spawn in a row.
With the tutorial I did a Manager that uses only one prefab. So I think I need an array of prefabs which are randomly initiating to the track. But I don’t know how to do it
For the Array I wrote:
var levelTiles : GameObject[];
var levelTile1: GameObject;
var levelTile2: GameObject;
var levelTile3: GameObject;
levelTiles[0] = levelTile1;
levelTiles[1] = levelTile1;
levelTiles[2] = levelTile2;
BUT I don’t what I ave to do now.
Can something please help me ? I’m totally new at this.