This version of Unity is unsupported.

Image.SetNativeSize

Declaration

public void SetNativeSize();

Description

Adjusts the image size to make it pixel-perfect.

This means setting the Images RectTransform.sizeDelta to be equal to the Sprite dimensions.