Version: 2021.2
LanguageEnglish
  • C#

SpriteAtlasAsset.SetVariantScale

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

Declaration

public void SetVariantScale(float value);

Parameters

value The multiplier to downscale the Master Atlas's Texture by, the recommended range is from [0.1 ~ 0.99].

Description

Sets the value used to downscale the Master's Texture.

While packing a Variant SpriteAtlas, the Master Atlas's packed Texture is duplicated and downscaled according to this value. The resulting new Texture becomes this Atlas's packed Texture.