Hey everyone. I have an annoying bug I can’t figure out. Unity freezes when I hit the play button (it doesn’t ever turn blue). The only thing I’ve seen on the forums is talk about infinite loops. I’m quite sure my loops aren’t infinite, but they aren’t deterministic either… let me explain:
Basically I’m randomly generating and placing a galaxy (starsystems-stars-planets-asteroids) inside a confined map. If a starsystem is within a certain range of another, then the placement will loop until it randomly finds a good spot. I don’t think this is the issue as I have a breaker inside that breaks upon too many iterations.
So that is guess #1…
Guess # 2 is that the objects being placed have colliders (as triggers) and that unity can’t handle placing colliders when they are placed on top of each other.
If I place 10 starsystems (roughly 6 planets each). It crashed 30% of the time. If it goes up to 20, it’s like 100% crashes.
no errors, no debug statements. Also all the random generation is happening inside awake or start statements.
any thoughts?