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.
See Also: Loading texture and mesh data, Quality Settings.
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: