Version: Unity 6.5 (6000.5)
LanguageEnglish
  • C#

UploadData

struct in UnityEngine.Shaders

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

Description

Represents a shader variant that was uploaded to the GPU driver.

This struct provides information about a shader variant that was uploaded to the GPU driver during the last frame. You can use this information to add this variant to a ShaderVariantCollection or to a GraphicsStateCollection, in order to warm up the shader before it's used and reduce frame stutters.

Additional resources: VariantsUploadedToGpuLastFrame, PassIdentifier, LocalKeyword, ShaderStageFlags.

Properties

Property Description
keywordsThe keywords identifying the uploaded shader variant.
passIdentifierThe pass identifier for the uploaded shader variant.
shaderThe shader the uploaded shader variant belongs to.
stagesThe shader stages of the uploaded shader variant.
uploadTimeInMillisecondsThe time in milliseconds spent uploading the shader variant to the GPU driver.