Raw Image Set Native Size#
UI / Graphic / Raw Image / Raw Image Set Native Size
Description#
Executes the Set Native Size method on the Raw Image component
Code#
// <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;
}
}
}