Version: Unity 6.2 Alpha (6000.2)
Language : English
Configure mipmap streaming
Preload mipmap levels

Override the mipmap level of a texture

You configure Unity to override the mipmap level of a texture using the following:

Use the Priority property

Follow these steps:

  1. Select the texture asset in the Project window.
  2. In the Texture Import Settings window, in the Advanced section, set a Priority value between –128 and 127.

When Unity needs to reduce mipmap levels to meet the memory limit, it considers textures in priority order from low to high until it meets the limit. This means textures with a higher priority value are more likely to keep their higher-resolution mipmap levels.

Unity removes a mipmap level of a lower-priority texture every time it considers textures at that priority or higher. For example, if you set one texture to a Priority of 1 and another texture to a Priority of 5, Unity might remove four mipmap levels before it considers the second texture.

You can also use the following APIs to set the Priority value:

Use the API

Use the following APIs:

You can use the Mesh.GetUVDistributionMetric API to get an estimate of the UV density of a meshThe main graphics primitive of Unity. Meshes make up a large part of your 3D worlds. Unity supports triangulated or Quadrangulated polygon meshes. Nurbs, Nurms, Subdiv surfaces must be converted to polygons. More info
See in Glossary
. This helps you calculate the mipmap level you need, based on the position of the 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
. For example code, refer to Mesh.GetUVDistributionMetric.

Override mipmap levels on all textures

Use Texture.streamingTextureForceLoadAll to load all mipmap levels for all textures.

Additional resources

Configure mipmap streaming
Preload mipmap levels
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961