Skip to main content
edited body
Source Link
agiro
  • 269
  • 6
  • 15

I'm making a 2D game that consists mostly of sprites. As a lot of them were too large in file size, I swapped them into meshes with unlit materials without textures. Now, The problem is that Unity by default, just opening a blank scene, uses 20 MB of texture memory according to the profiler.

So I checked instantiating 100 of my sprites (294 kb each), where the profiler showed 100MB used.

After that I had only those meshes in the scene, still 100 pieces, vertex count 124 each, tri count 47. The memory usage was still around 100 MB, texture usage 20 MB

Lastly I instantiated 100-100, so the sprites and meshes together. I got around 106 MB used memory.

This is my used memory with the sprites: memory with sprites And this is my used memory with the meshes. enter image description here Now, as far as I know the meshedmeshes should rock in terms of memory as they are low res and have no textures attached. Could someone tell me what's going on, why are my meshes worse than using sprites? And how to sort this out?

I'm making a 2D game that consists mostly of sprites. As a lot of them were too large in file size, I swapped them into meshes with unlit materials without textures. Now, The problem is that Unity by default, just opening a blank scene, uses 20 MB of texture memory according to the profiler.

So I checked instantiating 100 of my sprites (294 kb each), where the profiler showed 100MB used.

After that I had only those meshes in the scene, still 100 pieces, vertex count 124 each, tri count 47. The memory usage was still around 100 MB, texture usage 20 MB

Lastly I instantiated 100-100, so the sprites and meshes together. I got around 106 MB used memory.

This is my used memory with the sprites: memory with sprites And this is my used memory with the meshes. enter image description here Now, as far as I know the meshed should rock in terms of memory as they are low res and have no textures attached. Could someone tell me what's going on, why are my meshes worse than using sprites? And how to sort this out?

I'm making a 2D game that consists mostly of sprites. As a lot of them were too large in file size, I swapped them into meshes with unlit materials without textures. Now, The problem is that Unity by default, just opening a blank scene, uses 20 MB of texture memory according to the profiler.

So I checked instantiating 100 of my sprites (294 kb each), where the profiler showed 100MB used.

After that I had only those meshes in the scene, still 100 pieces, vertex count 124 each, tri count 47. The memory usage was still around 100 MB, texture usage 20 MB

Lastly I instantiated 100-100, so the sprites and meshes together. I got around 106 MB used memory.

This is my used memory with the sprites: memory with sprites And this is my used memory with the meshes. enter image description here Now, as far as I know the meshes should rock in terms of memory as they are low res and have no textures attached. Could someone tell me what's going on, why are my meshes worse than using sprites? And how to sort this out?

Source Link
agiro
  • 269
  • 6
  • 15

Unity engine memory usage issue - taking up more than it should

I'm making a 2D game that consists mostly of sprites. As a lot of them were too large in file size, I swapped them into meshes with unlit materials without textures. Now, The problem is that Unity by default, just opening a blank scene, uses 20 MB of texture memory according to the profiler.

So I checked instantiating 100 of my sprites (294 kb each), where the profiler showed 100MB used.

After that I had only those meshes in the scene, still 100 pieces, vertex count 124 each, tri count 47. The memory usage was still around 100 MB, texture usage 20 MB

Lastly I instantiated 100-100, so the sprites and meshes together. I got around 106 MB used memory.

This is my used memory with the sprites: memory with sprites And this is my used memory with the meshes. enter image description here Now, as far as I know the meshed should rock in terms of memory as they are low res and have no textures attached. Could someone tell me what's going on, why are my meshes worse than using sprites? And how to sort this out?