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 |