Override the mipmap level to influence which level Unity loads, rather than relying only on automatic mipmap streaming. You can do this in either of the following ways:
Follow these steps:
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:
The Texture2D.requestedMipmapLevel API sets a specific mipmap level, overriding the level mipmap streaming would calculate. This is also necessary for objects Unity can’t calculate a level for. Use the following APIs:
For a basic example that pins a texture to a fixed mipmap level, refer to Texture2D.requestedMipmapLevel.
To manually calculate a level from 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 position, use the Mesh.GetUVDistributionMetric API to estimate 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. For example code, refer to Mesh.GetUVDistributionMetric.
The level you request is still subject to your texture quality settings. The mipmap limit can cap the resolution, so a requested level of 0 might not load the texture’s full resolution. Unity can also reduce the loaded level to stay within the memory budget, limited by the Max Level Reduction value and in order of texture streaming Priority.
Use Texture.streamingTextureForceLoadAll to load all mipmap levels for all textures.