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

Rect Transform Set Local Top#

UI / Layout / Rect Transform / Rect Transform Set Local Top

Description#

Executes the Set Local Top method on the Rect Transform component

Parameters#

Name Description
Value
Preserve Size

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("Rect Transform Set Local Top")]
    [Category("UI/Layout/Rect Transform/Set Local Top")]
    [Description("Executes the Set Local Top method on the Rect Transform component")]

    [Image(typeof(IconRectTransform), ColorTheme.Type.TextLight)]
    [Keywords("UI, Layout")]

    [Parameter("Value")]
    [Parameter("Preserve Size")]

    [Serializable]
    public class GenInstructionRectTransform_SetLocalTop_2 : Instruction
    {
        [SerializeField] private GetGameObject m_RectTransform = new GetGameObject(
            new GenTypeGameObject_RectTransform()
        );

        [SerializeField] private GetNumber m_Value = new GetNumber();

        [SerializeField] private GetBool m_PreserveSize = new GetBool();

        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Set Local Top");
            return $"{this.m_RectTransform} {method} ({this.m_Value}, {this.m_PreserveSize})";
        }

        protected override Awaitable Run(Args args)
        {
            RectTransform component = this.m_RectTransform.Get<RectTransform>(args);
            if (component == null) return Done;

            component.SetLocalTop(
                (float) this.m_Value.Get(args),
                (bool) this.m_PreserveSize.Get(args)
            );

            return Done;
        }
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.