Version: 2023.1

Texture.desiredTextureMemory

切换到手册
public static ulong desiredTextureMemory ;

描述

The total size of the Textures, in bytes, that Unity loads if there were no other constraints. Before Unity loads any Textures, it applies the memory budget which reduces the loaded Texture resolution if the Texture sizes exceed its value. The desiredTextureMemory value takes into account the mipmap levels that Unity has requested or that you have set manually.

For example, if Unity does not load a Texture at full resolution because it is far away or its requested mipmap level is greater than 0, Unity reduces the desiredTextureMemory value to match the total memory needed.

The desiredTextureMemory value can be greater than the Texture.targetTextureMemory value.