So I’m in publishing mode and getting ready to do a final launch of my game and I’m trying to determine what minimum device specification is needed for the game to work perfectly since it’s a paid game and I don’t want people to download it and not have it work. Well when I start the editor when I’m in a level it will say total memory used 312mb or something around that, and then I exit the editor and go to another level, start the editor and the memory used it 200-300 mb, which is great by me (I’m going to work on making that substantially less in the next update), anyway, when I start testing the full game and I’m in one level the memory used matches what I checked the first time then when I click to go to the next level, the memory spike up, its suddenly 600mb-700mb, and going back and forth it increases a little each time, do I have something wrong? I checked online and one post that’s pretty old says that mlnodevelop does not handle garbage collection to well and does clear up used variables once they are no longer in use, is that still true with unity 5? Any tips on how I can make this better?
Unity does not clear the previous level until the new level is loaded, and after that it slowly clears it up each garbage collector cycle. A well known trick is to put a very simple loading scene in-between scenes. So you go to the loading screen, it clears up the previous scene while loading the next scene, next scene takes less space because the only garbage is from the much simpler loading scene.