Struct CustomShapeRequest
One texture to register as a marker shape, for the batch overload of RegisterCustomShapes(IReadOnlyList<CustomShapeRequest>, List<MarkerShape>).
public readonly struct CustomShapeRequest
- Inherited Members
Remarks
Registering shapes one at a time repacks the shape atlas per call. Collecting the whole set into requests and handing them over in one call packs once instead, which is what this struct exists for.
Constructors
CustomShapeRequest(Texture2D, bool)
A shape to register.
public CustomShapeRequest(Texture2D readableTexture, bool asSdf = false)
Parameters
readableTextureTexture2DCPU-readable texture, for example a sprite rasterized from an imported SVG.
asSdfboolTrue bakes the alpha silhouette into a distance field so the shape stays crisp at any size (monochrome, tinted by the marker color). False keeps a full-color sprite.
Properties
AsSdf
True to bake the source alpha into a signed distance field; false to keep a full-color sprite.
public bool AsSdf { get; }
Property Value
Texture
CPU-readable source texture for this shape.
public Texture2D Texture { get; }
Property Value
- Texture2D