Hey, i want to make it so that an empty game object loads a random prefab with the tag “food” so if i make 3 prefabs with the tag food, when the game starts the empty game object will replace itself with a random object from the three objects with the tag food so when the game starts there will always be a random food you get.
I wouldnt use prefabs, I would make a list of the objects and randomly choose from that list.
so the variable would be: var food : GameObject[]; if I remember correctly
then you should use: Random.Range(0, 5);
you could also use a variable for those. If you want to know how much objects you have in the list, do this: print(food.lenght);
that’ s it