docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetPayloadScaleOffset

    GetPayloadScaleOffset(Texture, in Vector4)

    Get location of the actual texture data without padding in the atlas.

    Declaration
    public Vector4 GetPayloadScaleOffset(Texture texture, in Vector4 scaleOffset)
    Parameters
    Type Name Description
    Texture texture

    The source texture cached in the atlas.

    Vector4 scaleOffset

    Cached atlas location (scale and offset) for the source texture.

    Returns
    Type Description
    Vector4

    Scale and offset for the source texture without padding.

    GetPayloadScaleOffset(in Vector2, in Vector2, in Vector4)

    Get location of the actual texture data without padding in the atlas.

    Declaration
    public static Vector4 GetPayloadScaleOffset(in Vector2 textureSize, in Vector2 paddingSize, in Vector4 scaleOffset)
    Parameters
    Type Name Description
    Vector2 textureSize

    Size of the source texture

    Vector2 paddingSize

    Padding size used for the source texture.

    Vector4 scaleOffset

    Cached atlas location (scale and offset) for the source texture.

    Returns
    Type Description
    Vector4

    Scale and offset for the source texture without padding.

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