Randomly generating obstacles in Unity : <p>Currently I'm creating game in which whole level is generated when player moves. I have working script for that, but now I want to generate obstacles in front of the player. My idea is to add empty object to my terrain segment(these are dynamically generated) and then instantiate random obstacles at their position at runtime. The only thing i don't know is how this script should pick random empty object(empty object is child of the segment) to instantiate this obstacle? The script which generates level is attached to player.</p>
