I have an RTS-based game. There is a gameobject called “MAP” containing all 64x64 tiles information of the whole map. Tiles aren’t gameobjects, just classes. The array of those tiles has [HideInInspector]. The game runs fine but when I pause the game and click on the MAP object in the scene to inspect it the whole unity editor freezes and after some time it crashes due to out of memory.
I’m not sure why it has enough memory to run but not enough memory to inspect. Since the editor always crashes, I can’t find a way to debug it either.
64x64 is “only” 4096. I highly doubt this is enough to freeze the editor or make your computer run out of memory.
Most likely, there’s an infinite loop somewhere in your code that only gets triggered via the editor. Time for some good old binary-search debugging: start stripping stuff out from your code until you find the culprit.