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