Struct Image2DAlphaMask | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Struct Image2DAlphaMask

    A component that keeps a read only alpha mask of an Image2D for use in hit testing, when pixelAccurate hit testing is enabled.

    Namespace: Unity.Tiny.Core2D
    Syntax
    public struct Image2DAlphaMask : IComponentData
    Remarks

    Add the Image2DAlphaMask component next to an Image2D component before loading the image. The result is written to a Image2DAlphaMaskData component that is placed next to the Image2DAlphaMask.

    Fields

    threshold

    Threshold value for when a bit is set or not, depending on the alpha value of the adjacent Image2D. Default value is .5.

    Declaration
    public float threshold
    Field Value
    Type Description
    System.Single

    Properties

    Default

    Declaration
    public static Image2DAlphaMask Default { get; }
    Property Value
    Type Description
    Image2DAlphaMask
    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