set native size unity empty game object sprite code example Example: unity gameobject sprite set native size in script TargetsGO.GetComponent().SetNativeSize();