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

Vector2 Y#

Vectors / Vector2 Y

  • Can Read

  • Cannot Write

Description#

The Y component of a Vector2

Code#

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]
    
    [Title("Vector2 Y")]
    [Category("Vectors/Vector2 Y")]
    
    [Description("The Y component of a Vector2")]
    [Image(typeof(IconVector2), ColorTheme.Type.Lime, typeof(BadgeY))]
    
    [Keywords("Value", "Component", "Y", "G", "Yaw", "Up")]
    
    [Serializable]
    public class TypeNumberVector2Y : TypeNumber
    {
        [SerializeField] private GetVector2 m_Vector2 = new GetVector2();

        public override double GetPreview(GameObject source) => this.m_Vector2.GetPreview(source).y;

        public override double Get(Args args)
        {
            return this.m_Vector2.Get(args).y;
        }

        public override string ToString()
        {
            return $"{this.m_Vector2}.y";
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.