Version: 2020.1
LanguageEnglish
  • C#

Texture.streamingTextureLoadingCount

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public static ulong streamingTextureLoadingCount;

Description

Number of streaming textures with mipmaps currently loading.

When adding a new camera it can take a few frames to detect which new textures need to be loaded. Therefore this value can't be relied upon immediately. If any objects move or the camera moves then this value will change so it's not guaranteed to drop to zero. When implementing camera cuts it is recommended you have a minimum time to allow mipmap levels to be calculated and maximum time to wait before doing the cut. This property can be used with a value between the min and max time in order to cut earlier if the mipmaps are loaded in time.

The minimum time is dependent on the number of renderers in the Scene and the number that are processed each frame. A minimum frame delay can be calculated as (Texture.streamingRendererCount + (QualitySettings.streamingMipmapsRenderersPerFrame-1)) / QualitySettings.streamingMipmapsRenderersPerFrame. The maximum time should be an acceptable delay to a user. E.g. 0.5 seconds (or 30 frames at 60Hz).

Generally streamingTexturePendingLoadCount is a better choice for camera cut delay as it includes both pending and active loading.

See Also: Texture.streamingTexturePendingLoadCount

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答