Table of Contents

Class SurfaceWorldLabelLayer

Namespace
LansMap.Markers.World
public sealed class SurfaceWorldLabelLayer : IDisposable
Inheritance
object
SurfaceWorldLabelLayer
Implements

Constructors

SurfaceWorldLabelLayer(MarkerStore, Font)

public SurfaceWorldLabelLayer(MarkerStore store, Font customFont = null)

Parameters

store MarkerStore
customFont Font

Fields

FontSizePx

public int FontSizePx

Field Value

int

HaloColor

public Color HaloColor

Field Value

Color

HaloWidthPx

public float HaloWidthPx

Field Value

float

OffsetAbovePx

public float OffsetAbovePx

Field Value

float

PlatePaddingPx

public float PlatePaddingPx

Field Value

float

Store

public readonly MarkerStore Store

Field Value

MarkerStore

Visible

public bool Visible

Field Value

bool

Properties

LabelColor

public Color32 LabelColor { get; set; }

Property Value

Color32

LabelCount

public int LabelCount { get; }

Property Value

int

LabelFont

Swap to any Unity Font asset; takes effect next rebuild.

public Font LabelFont { get; set; }

Property Value

Font

PlateColor

public Color32 PlateColor { get; set; }

Property Value

Color32

Methods

ClearLabels()

public void ClearLabels()

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

RemoveLabel(int)

public void RemoveLabel(int markerId)

Parameters

markerId int

Render(MapViewTransform, in SurfaceUvMap, Transform, Renderer)

Submits this frame's draw. Call once per frame after the surface view is final (LateUpdate), same convention as SurfaceWorldMarkerRenderer.Render.

public void Render(MapViewTransform view, in SurfaceUvMap uvMap, Transform plane, Renderer planeRenderer)

Parameters

view MapViewTransform

The surface's own view (pitch 0).

uvMap SurfaceUvMap

UV parameterisation of the table mesh.

plane Transform

The table transform labels stand above.

planeRenderer Renderer

Renderer whose world bounds seed the draw's culling bounds. A screen-constant billboard has no exact world-space bound (it grows with camera distance), so the padding here is a generous heuristic rather than a measured figure - the same "too large is always the safe direction" rule SurfaceWorldMarkerRenderer's culling bounds already follow.

SetLabel(int, string, LabelVariant, LabelWeight?)

Sets or replaces the caption drawn above markerId (a Store id). Variant scales off FontSizePx (h1 = 2x .. h6 = 1.1x, body = 1x); an explicit weight overrides the HTML-style default (headings bold, body normal).

public void SetLabel(int markerId, string text, LabelVariant variant = LabelVariant.Body, LabelWeight? weight = null)

Parameters

markerId int
text string
variant LabelVariant
weight LabelWeight?

TryGetLabel(int, out string)

public bool TryGetLabel(int markerId, out string text)

Parameters

markerId int
text string

Returns

bool