docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method UpdateTexture

    UpdateTexture(CommandBuffer, Texture, Texture, ref Vector4, Vector4, bool, bool)

    Update a texture in the atlas.

    Declaration
    public virtual bool UpdateTexture(CommandBuffer cmd, Texture oldTexture, Texture newTexture, ref Vector4 scaleOffset, Vector4 sourceScaleOffset, bool updateIfNeeded = true, bool blitMips = true)
    Parameters
    Type Name Description
    CommandBuffer cmd

    Target command buffer for graphics commands.

    Texture oldTexture

    Texture in atlas.

    Texture newTexture

    Replacement source texture.

    Vector4 scaleOffset

    Destination scale (.xy) and offset (.zw)

    Vector4 sourceScaleOffset

    Source scale (.xy) and offset(.zw).

    bool updateIfNeeded

    Enable texture blit.

    bool blitMips

    Blit mip maps.

    Returns
    Type Description
    bool

    True on success, false otherwise.

    UpdateTexture(CommandBuffer, Texture, ref Vector4, bool, bool)

    Update a texture in the atlas.

    Declaration
    public virtual bool UpdateTexture(CommandBuffer cmd, Texture texture, ref Vector4 scaleOffset, bool updateIfNeeded = true, bool blitMips = true)
    Parameters
    Type Name Description
    CommandBuffer cmd

    Target command buffer for graphics commands.

    Texture texture

    Texture in atlas.

    Vector4 scaleOffset

    Destination scale (.xy) and offset (.zw)

    bool updateIfNeeded

    Enable texture blit.

    bool blitMips

    Blit mip maps.

    Returns
    Type Description
    bool

    True on success, false otherwise.

    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)