docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class UnityRectExtensions

    Ad-hoc extensions to the Rect structure, used by Cinemachine

    Inheritance
    object
    UnityRectExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Cinemachine
    Assembly: Unity.Cinemachine.dll
    Syntax
    public static class UnityRectExtensions

    Methods

    Inflated(Rect, Vector2)

    Inflate a rect

    Declaration
    public static Rect Inflated(this Rect r, Vector2 delta)
    Parameters
    Type Name Description
    Rect r
    Vector2 delta

    x and y are added/subtracted to/from the edges of the rect, inflating it in all directions

    Returns
    Type Description
    Rect

    The inflated rect

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)