Table of Contents

Class MarkerPopup

Opens an info card when you click a marker.

[DefaultExecutionOrder(-10)]
public sealed class MarkerPopup : MonoBehaviour
Inheritance
object
Object
Component
Behaviour
MonoBehaviour
MarkerPopup

Fields

ClickSlopUnits

[Tooltip("Suppress the click when the pointer dragged more than this.")]
[FormerlySerializedAs("ClickSlopPx")]
public float ClickSlopUnits

Field Value

float

DoubleTapDeferSeconds

[Tooltip("Wait this long for a second tap. Double-tap zooms instead. 0 = open immediately.")]
public float DoubleTapDeferSeconds

Field Value

float

Map

[Tooltip("Map whose markers open popups. Anchors in that map's pixel space (screen, or a flat surface).")]
public BaseMapView Map

Field Value

BaseMapView

PickRadiusUnits

[Tooltip("Pick radius around the click in screen pixels.")]
[FormerlySerializedAs("PickRadiusPx")]
public float PickRadiusUnits

Field Value

float

Pointer

[NonSerialized]
public IMapPointerSurface Pointer

Field Value

IMapPointerSurface

Prefabs

[Tooltip("Prefab-tier manager to pick with the bulk layer. Empty uses one on this GameObject.")]
public WorldMarkerManager Prefabs

Field Value

WorldMarkerManager

Tabletop

[Tooltip("Tabletop to pick floating markers on. Empty uses Pointer when it is a table.")]
public TabletopContentView Tabletop

Field Value

TabletopContentView

WidthUnits

[Tooltip("Card width in pixels.")]
[FormerlySerializedAs("WidthPx")]
public float WidthUnits

Field Value

float

Methods

FillCard(MarkerRef, MarkerInfoStore, MarkerLabelLayer, Label, Label)

Writes the card title and body from marker info, with a slot-or-handle fallback for the title.

public static void FillCard(MarkerRef marker, MarkerInfoStore info, MarkerLabelLayer labels, Label title, Label body)

Parameters

marker MarkerRef

Marker whose info is shown.

info MarkerInfoStore

Name, label, and hover-text store; null skips those fields.

labels MarkerLabelLayer

Bulk label layer used when info has no name or label; null skips that fallback.

title Label

Title label to write.

body Label

Body label to write; hidden when there is no hover text.

TryProjectAnchor(in MarkerRef, BaseMapView, WorldMarkerManager, TabletopContentView, out ScreenPoint, out float)

Projects a marker to the map's pixel space so the card can sit above it.

public static bool TryProjectAnchor(in MarkerRef marker, BaseMapView map, WorldMarkerManager prefabs, TabletopContentView tabletop, out ScreenPoint p, out float sizePx)

Parameters

marker MarkerRef

Marker to project.

map BaseMapView

Map whose view supplies the projection.

prefabs WorldMarkerManager

Prefab-tier store; null skips that tier.

tabletop TabletopContentView

Tabletop that owns floating world-bulk markers; null skips that path.

p ScreenPoint

Projected position in the map's pixel space, origin top-left.

sizePx float

Marker size in screen px used to offset the card.

Returns

bool

False when the marker is not live or not drawn.

TryProjectAnchor(in MarkerRef, BaseMapView, WorldMarkerManager, TabletopContentView, bool, out ScreenPoint, out float)

Projects a marker to the map's pixel space, resolving bulk handles on the world-marker store when the pick came from the table.

public static bool TryProjectAnchor(in MarkerRef marker, BaseMapView map, WorldMarkerManager prefabs, TabletopContentView tabletop, bool bulkFromWorldLayer, out ScreenPoint p, out float sizePx)

Parameters

marker MarkerRef

Marker to project.

map BaseMapView

Map whose view supplies the projection.

prefabs WorldMarkerManager

Prefab-tier store; null skips that tier.

tabletop TabletopContentView

Tabletop that owns floating world-bulk markers; null skips that path.

bulkFromWorldLayer bool

True when the pick came from TryPick(Ray, float, out MarkerRef); bulk handles then resolve on the world-marker store, not a colliding texture-store id.

p ScreenPoint

Projected position in the map's pixel space, origin top-left.

sizePx float

Marker size in screen px used to offset the card.

Returns

bool

False when the marker is not live or not drawn.