Version: 2018.3 (switch to 2019.1 )
Optimizing Shader Load Time
Streaming Controller
Other Versions

Texture Streaming

The Texture Streaming system gives you control over which mipmap levels Unity loads into memory. This system reduces the total amount of memory Unity needs for Textures, because it only loads the mipmaps Unity needs to render the current CameraA component which creates an image of a particular viewpoint in your scene. The output is either drawn to the screen or captured as a texture. More info
See in Glossary
position in 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
, instead of loading all of them by default. It trades a small amount of CPU resources to save a potentially large amount of GPU memory.

With the Texture System, you can also use the Memory Budget to set a total memory limit for all Textures to use in a Project. The Texture Streaming system automatically reduces mipmap levels to stay within this budget.

You can use the Texture System API to request specific mipmap levels for specific Textures. Unity provides sample C# code that duplicates the engine logic for mipmap selection, which you can use to override the engine logic for your own Projects. For more details, see Texture Streaming API.

In Unity’s Viking Village demo project, Texture Streaming saves 25–30% of Texture memory, depending on Camera location.

Texture Streaming setup

To enable Texture Streaming, go to Unity’s Quality Settings (Edit > Project SettingsA broad collection of settings which allow you to configure how Physics, Audio, Networking, Graphics, Input and many other areas of your Project behave. More info
See in Glossary
> Quality) and enable the Texture Streaming checkbox. This reveals the settings specific to the Texture Streaming system. For details on each setting, see documentation on Quality Settings.

When you’ve done this, set up Texture Streaming on individual Textures, to allow the Texture Streaming system to stream each Texture’s mipmaps from the disk into memory. To do this, select the Texture you want to apply Texture Streaming to, navigate to the InspectorA Unity window that displays information about the currently selected GameObject, Asset or Project Settings, alowing you to inspect and edit the values. More info
See in Glossary
window and view the Texture Import settings. Open the Advanced settings, and enable the Streaming Mip Maps checkbox.

If you’re developing for Android, you also need to open the Build Settings and set the Compression Method to LZ4 or LZ4HC. Unity requires one of these compressionA method of storing data that reduces the amount of storage space it requires. See Texture Compression3D Graphics hardware requires Textures to be compressed in specialised formats which are optimised for fast Texture sampling. More info
See in Glossary
, Animation CompressionThe method of compressing animation data to significantly reduce file sizes without causing a noticable reduction in motion quality. Animation compression is a trade off between saving on memory and image quality. More info
See in Glossary
, Audio Compression, Build Compression.
See in Glossary
methods for asynchronous Texture loading, which the Texture Streaming system relies upon.

Unity loads mipmaps at the highest resolution level possible while observing the Texture Memory Budget. For more specific control, or to fine-tune the Texture Streaming system’s automatic results, use the C# API to specify mipmap levels for each Texture. For more details, see Texture Streaming API .

Did you find this page useful? Please give it a rating:

Optimizing Shader Load Time
Streaming Controller