Freeze on stop. Freeze when deleting GameObjects during runtime.,Slow to delete. Slow to exit play mode.

I’ve been trying to track a problem I’m having since upgrading Unity to the newest version.

Playing the program is fine. It runs, creating a hex board with multiple low-poly trees and rotating the camera while displaying a UI. The problem comes when I push the play button again, ending the program. Everything freezes for a while. This did not happen before I upgraded Unity.

More info:

I paused the game. No problem. The scene creates three maps, rotates around a center point and turns the maps on in a rotation (shows one at a time).

Here’s the fun part: I delete one of the maps and it freezes. No scripts on these maps. There shouldn’t be any coroutines accessing the maps. Simple mesh with textures.

I hope someone can help me track this down. Sorry if this is a wrong format, missing info, etc. First time posting.,I’ve been trying to track a problem I’m having since upgrading Unity to the newest version.

Spent a little time on this this weekend. Ultimately the Unity update has made the destruction or removal of gameObjects to take a longer time. Whereas creating them takes a short time, destroying them can take up to 100ms (my best estimate) each on an average machine. If you have 1000 gameObjects, you are looking at a minute and a half to shutdown.

I’ll have to test if it’s my Scene, program or Unity in general. I’ll update again if I get around to testing an empty project, creating 1000 cubes and then destroying them.