- Home /
Instantiating at random. Objects instantiates on top of eachother...
Greetings!
I have a script that randomly generates roads and houses in a tile like manner. What I am doing is generating the roads and houses to a fixed size. I want to be able to increase the town size over time. I managed to do so but the result afterwards was that it generated the whole thing twice.
I am quite noobish when it comes to programming but I do recall playing around with Enums a long time ago. So I got the idea that maybe using Enums on the "Tiles" saying basically "If the tile is (Buildable) instantiate a house there. Otherwise "If the tils is (BuiltOn) don't instantiate there.
I think this is a possible way of doing things but I have no idea where to begin. Any help is appreciated! Thank you all :)
Your answer
![](https://koobas.hobune.stream/wayback/20220612182003im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Grabbing an Inherited Variable 0 Answers
Problems with enums and switches (C#) 2 Answers
Restricting enum options in inspector when using a propertydrawer. 0 Answers