Rect myRect = new Rect(0,0,200,100); myRect.AdjustVerticallyBy(50); Console.WriteLine(myRect.ToString());
using UnityEngine; RectTransform myRectTransform = GetComponentThis example uses the AdjustVerticallyBy method to increase the height of a RectTransform component in a Unity game engine script. The code accesses the RectTransform component and then modifies its Rect property using the AdjustVerticallyBy method. The Rect AdjustVerticallyBy method is part of the System.Windows.Rect struct and is included in the .NET Framework.(); myRectTransform.rect.AdjustVerticallyBy(20);