- Home /
Problem with RAM usage on iOS build
Hello. I encountered memory problems with project. Unity version - 5.5.1p3, build for the iOS, which includes terrain of 25 km2 with Heightmap 4K, Splat Map 2K, NavMesh size of 67.2 MB. We use texture compression PVRTC 2 bits for normal textures and PVRTC 4 bits for the UI, all the music and all voice conversations - Streaming. The project is building only with the ARM64, ARMv7 disabled. In addition, the Player Settings includes Prebake Collision Meshes, Optimize Mesh Data. Static batching is not used, only the GPU Instancing. Now the project takes on iPhone 5s up to 500 MB of RAM with an incomplete content, if we include everything what need to complete the game, then the memory will jump up to about 600 MB, and this is crash. It would be desirable to reduce the memory consumption of 50-100 MB on iPhone 5s.
At the same time I tried to bring the same project for Android on the Galaxy Note 5 using IL2CPP. There's the same project takes only 470 MB of RAM. Why is this happening?
I raise questions about Objects and ShaderLab in Profiler/Other - what they contain? Is it possible to somehow reduce them?
Why is the removal NavMesh drops memory not to 67.2 MB, but 150 MB? According to my observations, in addition to Assets memory, when removing NavMesh memory also reduced in Objects - really NavMesh duplicated in memory?
Will some reduction in the number of materials reduce memory usage? Whether memory usage reduce after reduction Normal Map in the materials? We use a modified Standard Shader with added support for GPU Instancing.
Will Shader Variant Collections optimize memory usage?
Occlusion Culling is stored in the RAM is fully or partially loaded it? Now there is no Occlusion Culling Data in project
Do the included Blend Probes, Reflection Probes and Motion Vectors on the Mesh Renderer and Skinned Mesh Renderer influence on the memory usage even if they are not used?
Audio. In the project there are lossless-version files in the highest quality, and in Unity they are setup to import Vorbis / 5-25% quality. There is some memory optimization if we replace the lossless-source to a pre-edited MP3-files or it does not make sense?
Is it possible to do something in XCode, or the entire project optimization is done exclusively in Unity?
Perhaps you can give any more good advice? We need to squeeze as much as possible of free memory. I am attaching Profiler screenshots from the iPhone 7.
@Reedmand Did you find any ways to reduce memory footprint? I also need to reduce memory footprint of my unity game. Can you please help me here? I am new to unity who just wants to integrate a game in native ios app.