In your built application, Unity stores several ‘chunks’ of compressed shaderA program that runs on the GPU. More info
See in Glossary variant data. Each chunk contains multiple shader variants. When Unity loads a sceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary at runtime, it loads all the scene’s chunks into CPU memory and decompresses them.
To reduce memory usage on platforms that have limited memory, you can limit the size of chunks and how many decompressed chunks Unity keeps in memory.
To do this, in Player settingsSettings that let you set various player-specific options for the final game built by Unity. More info
See in Glossary, select Other Settings > Shader Variant Loading and adjust the following settings:
0
, which means there’s no limit.See PlayerSettings.SetDefaultShaderChunkCount for more information.
You can use Override to override the values for each platform individually. See PlayerSettings.SetShaderChunkCountForPlatform for more information.
You can also use Shader.maximumChunksOverride to override Default chunk count at runtime.