Version: 2020.1
LanguageEnglish
  • C#

QualitySettings.asyncUploadBufferSize

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

Switch to Manual
public static int asyncUploadBufferSize;

Description

Asynchronous texture and mesh data upload provides timesliced async texture and mesh data upload on the render thread with tight control over memory and timeslicing. There are no allocations except for the ones which driver has to do. To read data and upload texture and mesh data, Unity re-uses a ringbuffer whose size can be controlled.

Use asyncUploadBufferSize to set the buffer size for asynchronous texture and mesh data uploads. The size is in megabytes. The minimum value is 2 and the maximum value is 512. The buffer resizes automatically to fit the largest texture currently loading. To avoid re-sizing of the buffer, which can incur performance cost, set the value approximately to the size of biggest texture used in the Scene.

using UnityEngine;

public class StartupExampleScript : MonoBehaviour { void Start() { // Set Ring Buffer Size to 16 MB. QualitySettings.asyncUploadBufferSize = 16; } }

See Also: Quality Settings.

Did you find this page useful? Please give it a rating: