- Home /
My Unity Editor crashes when i try to enter playmode
when i press play it says application.playmode in a pop up window and then it continues forever until i end the task entirely. i think it is an infinite loop problem with this script
my script is meant to randomly generate a building with enemies so you can shoot it with a bird like in angry birds.
i think the problem is in this because when i dont check for a tag and just check if it isnt null it works. raycastHit is just a raycast coming from the middle of the block.
> // blocks and the ground has the tag Ground
> if (raycastHit.collider.tag == "Ground")
> {
> isGrounded = true;
> }
This code is unreadable, don't expect anyone to sift through this trying to make sense of it if it is formatted like this. All I can say is i guess one of your many loops is running infinitely, probably because isGrounded is never true or something. I really can't bother too much looking at this mess of a format
Answer by logicandchaos · Feb 02, 2021 at 12:56 AM
It probably has to do with your while loops, if your loops appear infinite then unity will crash.