Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Visual Script logo Manual

Slider Set Direction#

UI / Interaction / Slider / Slider Set Direction

Description#

Executes the Set Direction method on the Slider component

Parameters#

Name Description
Direction
Include Rect Layouts

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("Slider Set Direction")]
    [Category("UI/Interaction/Slider/Set Direction")]
    [Description("Executes the Set Direction method on the Slider component")]
    
    [Image(typeof(IconUISlider), ColorTheme.Type.TextLight)]
    [Keywords("UI, User, Interface")]
    
    [Parameter("Direction")]
    [Parameter("Include Rect Layouts")]
    
    [Serializable]
    public class GenInstructionSlider_SetDirection_2 : Instruction
    {
        [SerializeField] private GetGameObject m_Slider = new GetGameObject(
            new GenTypeGameObject_Slider()
        );
        
        [SerializeField] private Slider.Direction m_Direction = default;
        
        [SerializeField] private GetBool m_IncludeRectLayouts = new GetBool();
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Set Direction");
            return $"{this.m_Slider} {method} ({this.m_Direction}, {this.m_IncludeRectLayouts})";
        }
        
        protected override Awaitable Run(Args args)
        {
            Slider component = this.m_Slider.Get<Slider>(args);
            if (component == null) return Done;
            
            component.SetDirection(
                this.m_Direction,
                (bool) this.m_IncludeRectLayouts.Get(args)
            );
            
            return Done;
        }
    }
}

Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.