# Analyze mipmap streaming

> Understand and debug mipmap streaming in your scene.

The Editor view has a Debug Draw Mode that helps you visualize and debug [mipmap streaming](/engine/6000.5/manual/materials-and-shaders/textures/texture-loading/texture-streaming.md) in your scene. To enable it, follow these steps:

1. Select **Debug Draw Mode** in the [Scene view Draw Modes overlay](/engine/6000.5/manual/overlays-reference-draw-modes.md).
2. Select **Texture Mipmap Streaming**.

The Debug Draw Mode tints GameObjects the following colours:

* Green if a texture uses fewer mipmap levels.
* Red if a texture uses fewer mipmap levels because mipmap streaming doesn't have enough resources to load them all.
* Blue if a texture that doesn't use mipmap streaming, or there's no renderer calculating the mipmap levels.

> **Note:**
>
> If you use the [MainTexture](/engine/6000.5/script-reference/unityengine/material/maintexture.md) API to set a main texture, the texture won't display in the Debug Draw Mode.

If your project uses a scriptable render pipeline, use the following to analyze mipmap streaming instead:

* [Rendering Debugger in URP](/engine/6000.5/manual/analysis/graphics-performance-profiling/in-urp/understand-performance/rendering-debugger.md)
* [Rendering Debugger in HDRP](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@17.0/manual/rendering-debugger-window-reference)

## Get mipmap streaming information in a script

To get information about texture memory, use the following properties:

* [Texture.currentTextureMemory](/engine/6000.5/script-reference/unityengine/texture/currenttexturememory.md)
* [Texture.desiredTextureMemory](/engine/6000.5/script-reference/unityengine/texture/desiredtexturememory.md)
* [Texture.totalTextureMemory](/engine/6000.5/script-reference/unityengine/texture/totaltexturememory.md)
* [Texture.targetTextureMemory](/engine/6000.5/script-reference/unityengine/texture/targettexturememory.md)
* [Texture.nonStreamingTextureMemory](/engine/6000.5/script-reference/unityengine/texture/nonstreamingtexturememory.md)

To get information about the number of textures or renderers that mipmap streaming affects, use the following properties:

* [Texture.streamingMipmapUploadCount](/engine/6000.5/script-reference/unityengine/texture/streamingmipmapuploadcount.md)
* [Texture.nonStreamingTextureCount](/engine/6000.5/script-reference/unityengine/texture/nonstreamingtexturecount.md)
* [Texture.streamingTextureCount](/engine/6000.5/script-reference/unityengine/texture/streamingtexturecount.md)
* [Texture.streamingRendererCount](/engine/6000.5/script-reference/unityengine/texture/streamingrenderercount.md)

To get information about the mipmap levels for a texture, use the following properties:

* [Texture2D.desiredMipmapLevel](/engine/6000.5/script-reference/unityengine/texture2d/desiredmipmaplevel.md)
* [Texture2D.loadingMipmapLevel](/engine/6000.5/script-reference/unityengine/texture2d/loadingmipmaplevel.md)
* [Texture2D.loadedMipmapLevel](/engine/6000.5/script-reference/unityengine/texture2d/loadedmipmaplevel.md)
