Legacy Documentation: Version 5.6 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

RawImage.SetNativeSize

public void SetNativeSize();

Description

Adjusts the raw image size to make it pixel-perfect.

This means setting the RawImage's RectTransform.sizeDelta to be equal to the Texture dimensions.