---
tags:
    - "UI, User, Interface"
---

# Raw Image Set Native Size

[UI](../../index.md) / [Graphic](../index.md) / [Raw Image](index.md) / **Raw Image Set Native Size**

## Description

Executes the Set Native Size method on the Raw Image component

## Code

```cs
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>

using System;
using UnityEngine;
using VisualScript.Icons;
using UnityEngine.UI;

namespace VisualScript.Runtime
{
    [Title("Raw Image Set Native Size")]
    [Category("UI/Graphic/Raw Image/Set Native Size")]
    [Description("Executes the Set Native Size method on the Raw Image component")]
    
    [Image(typeof(IconRawImage), ColorTheme.Type.TextLight)]
    [Keywords("UI, User, Interface")]
    
    [Serializable]
    public class GenInstructionRawImage_SetNativeSize_0 : Instruction
    {
        [SerializeField] private GetGameObject m_RawImage = new GetGameObject(
            new GenTypeGameObject_RawImage()
        );
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Set Native Size");
            return $"{this.m_RawImage} {method}";
        }
        
        protected override Awaitable Run(Args args)
        {
            RawImage component = this.m_RawImage.Get<RawImage>(args);
            if (component == null) return Done;
            
            component.SetNativeSize();
            
            return Done;
        }
    }
}


```

