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

Transform Scale Y#

Transform / Transform Scale Y

  • Can Read

  • Cannot Write

Description#

The Scale Y component of Transform component

Code#

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]
    
    [Title("Transform Scale Y")]
    [Category("Transform/Scale Y")]
    
    [Description("The Scale Y component of Transform component")]
    [Image(typeof(IconScale), ColorTheme.Type.Lime, typeof(BadgeY))]
    
    [Keywords("World", "Global", "Location", "Size")]
    
    [Serializable]
    public class TypeNumberTransformScaleY : TypeNumber
    {
        [SerializeField] private GetGameObject m_Transform = new GetGameObject(
            new GenTypeGameObject_Transform()
        );
        
        public override double Get(Args args)
        {
            Transform transform = this.m_Transform.Get<Transform>(args);
            return transform != null ? transform.lossyScale.y : 0;
        }
        
        public override string ToString()
        {
            return $"{this.m_Transform} Scale.y";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.