Set Image Fill Origin#
UI / Graphic / Image / Set Image Fill Origin
Description#
Sets the Fill Origin property of Image component
Parameters#
| Name | Description |
|---|---|
| Image | |
| Value |
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("Set Image Fill Origin")]
[Category("UI/Graphic/Image/Fill Origin")]
[Description("Sets the Fill Origin property of Image component")]
[Image(typeof(IconUIImage), ColorTheme.Type.TextLight)]
[Keywords("UI, User, Interface")]
[Parameter("Image")]
[Parameter("Value")]
[Serializable]
public class GenInstructionInteger_Image_SetFillOrigin : Instruction
{
[SerializeField] private GetGameObject m_Image = new GetGameObject(
new GenTypeGameObject_Image()
);
[SerializeField] private GetInteger m_Value = new GetInteger();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Fill Origin");
return $"{this.m_Image} {member} = {this.m_Value}";
}
protected override Awaitable Run(Args args)
{
Image component = this.m_Image.Get<Image>(args);
if (component == null) return Done;
component.fillOrigin = (int) this.m_Value.Get(args);
return Done;
}
}
}