Scroll Rect Stop Movement#
UI / Scroll / Scroll Rect / Scroll Rect Stop Movement
Description#
Executes the Stop Movement method on the Scroll Rect 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("Scroll Rect Stop Movement")]
[Category("UI/Scroll/Scroll Rect/Stop Movement")]
[Description("Executes the Stop Movement method on the Scroll Rect component")]
[Image(typeof(IconScrollRect), ColorTheme.Type.TextLight)]
[Keywords("UI, User, Interface")]
[Serializable]
public class GenInstructionScrollRect_StopMovement_0 : Instruction
{
[SerializeField] private GetGameObject m_ScrollRect = new GetGameObject(
new GenTypeGameObject_ScrollRect()
);
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Stop Movement");
return $"{this.m_ScrollRect} {method}";
}
protected override Awaitable Run(Args args)
{
ScrollRect component = this.m_ScrollRect.Get<ScrollRect>(args);
if (component == null) return Done;
component.StopMovement();
return Done;
}
}
}