This page contains the following sections:
Use the API to apply more control over how Unity streams Textures. You can override which mipmap level to load for specific Textures, while the Texture Streaming system automatically manages all other Textures. You might have specific gameplay scenarios where you know that Unity needs to fully load certain Textures. For example, moving large distances quickly, or using instantaneous 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 cuts, can cause noticeable Texture quality changes while the Texture Streaming system streams the mipmaps from the disk into memory. To reduce this problem, you can use the API to preload mipmaps at a new Camera location .
To enable and control Texture Streaming on a Texture, use the following properties:
Texture Streaming automatically reduces the size of Textures until they fit into the Texture Streaming Memory Budget. The Texture’s Mip Map Priority number is roughly a mipmap offset for the Memory Budget. For example, with a priority of 2, the Texture Streaming system tries to use a mipmap that is two mip levels higher than other Textures with a priority of 0. Negative values are also valid. If it can’t do this, it uses a lower mip level to fit the Memory Budget.
These properties are read-only at run time:
To control what happens at run time, use the following static properties:
QualitySettings.streamingMipmapsMemoryBudget (defaults to 512 MB)
QualitySettings.streamingMipmapsRenderersPerFrame (defaults to 512)
QualitySettings.streamingMipmapsMaxLevelReduction (defaults to 2)
QualitySettings.streamingMipmapsMaxFileIORequests (defaults to 1024)
To control the way Unity caches unused mip levels via script, use Texture2D.streamingTextureDiscardUnusedMips. It’s useful to set this to true for initial testing to check metrics, and to set a Memory Budget (set in Quality Settings when Texture Streaming is enabled, or via QualitySettings.streamingMipmapsMemoryBudget), otherwise Unity doesn’t drop any mips. The Memory Budget is set to 512MB by default.
In the 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), use Add All Cameras to specify whether Unity should calculate Texture Streaming for all Cameras in the Project. This is enabled by default.
For fine-grain control over which Cameras are active, use the Streaming Controller component on the same GameObjectThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary as the Camera component. This takes the location and Camera settings (such as Field of View) directly from the Camera component.
If the Camera is disabled, Unity does not calculate Texture Streaming for it, unless the Streaming Controller is enabled and in the preloading state. When the Streaming Controller and associated Camera are enabled, or if the Streaming Controller is in a preloading state, then Unity calculates Texture Streaming for this Camera. If the Streaming Controller is disabled, then Unity does not calculate Texture Streaming for this Camera.