[Unity] Memory Usage of UserControls
Posted: 15 Feb 2016, 16:23
Hi,
as my game's gui is nearly finished I'm testing the game more and more on mobile devices. As the game also includes an account management system next to various other things I'll only instantiate and add certain UserControls when needed.
Of course this results in a small delay when opening certain dialogs, meaning the usually smooth opening animations are not or only barely visible. Once they're in memory closing and opening it again looks as expected. You can also notice this small delay on a desktop pc, but naturally a lot less.
Now the question is whether I change it so that these dialogs, which are mostly only rarely needed, are instantiated from the beginning, so the animations would be smooth. They would use up more memory, of course.
So is there a way to check how much memory a UserControl uses at runtime? I could use the TaskManager and just compare the values from before and after opening such a dialog but I presume these values would not be necessarily accurate.
as my game's gui is nearly finished I'm testing the game more and more on mobile devices. As the game also includes an account management system next to various other things I'll only instantiate and add certain UserControls when needed.
Of course this results in a small delay when opening certain dialogs, meaning the usually smooth opening animations are not or only barely visible. Once they're in memory closing and opening it again looks as expected. You can also notice this small delay on a desktop pc, but naturally a lot less.
Now the question is whether I change it so that these dialogs, which are mostly only rarely needed, are instantiated from the beginning, so the animations would be smooth. They would use up more memory, of course.
So is there a way to check how much memory a UserControl uses at runtime? I could use the TaskManager and just compare the values from before and after opening such a dialog but I presume these values would not be necessarily accurate.