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