docs.unity3d.com
    Show / Hide Table of Contents

    Class UnityRectExtensions

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

    Inheritance
    Object
    UnityRectExtensions
    Namespace: Cinemachine.Utility
    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 fto/from the edges of the rect, inflating it in all directions

    Returns
    Type Description
    Rect

    The inflated rect

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023