Class SurfaceWorldLabelLayer
public sealed class SurfaceWorldLabelLayer : IDisposable
- Inheritance
-
objectSurfaceWorldLabelLayer
- Implements
Constructors
SurfaceWorldLabelLayer(MarkerStore, Font)
public SurfaceWorldLabelLayer(MarkerStore store, Font customFont = null)
Parameters
storeMarkerStorecustomFontFont
Fields
FontSizePx
public int FontSizePx
Field Value
HaloColor
public Color HaloColor
Field Value
- Color
HaloWidthPx
public float HaloWidthPx
Field Value
OffsetAbovePx
public float OffsetAbovePx
Field Value
PlatePaddingPx
public float PlatePaddingPx
Field Value
Store
public readonly MarkerStore Store
Field Value
Visible
public bool Visible
Field Value
Properties
LabelColor
public Color32 LabelColor { get; set; }
Property Value
- Color32
LabelCount
public int LabelCount { get; }
Property Value
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
markerIdint
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
viewMapViewTransformThe surface's own view (pitch 0).
uvMapSurfaceUvMapUV parameterisation of the table mesh.
planeTransformThe table transform labels stand above.
planeRendererRendererRenderer 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
markerIdinttextstringvariantLabelVariantweightLabelWeight?
TryGetLabel(int, out string)
public bool TryGetLabel(int markerId, out string text)