Class WorldMarkerInstance
public sealed class WorldMarkerInstance
- Inheritance
-
objectWorldMarkerInstance
Fields
CaptionFontOverride
public Font CaptionFontOverride
Field Value
- Font
CaptionFontSizeOverride
public int? CaptionFontSizeOverride
Field Value
- int?
CaptionTextColorOverride
public Color? CaptionTextColorOverride
Field Value
- Color?
DrawLabelsOverride
public bool? DrawLabelsOverride
Field Value
- bool?
Enabled
Authoring on/off. Default true. Zoom and offscreen hiding can still conceal an enabled marker. False must not be implemented as SetActive alone: the manager overwrites active every frame.
public bool Enabled
Field Value
HeadingDeg
public double HeadingDeg
Field Value
HideOffscreenMarkersOverride
public bool? HideOffscreenMarkersOverride
Field Value
- bool?
HoverBackgroundOverride
public Color? HoverBackgroundOverride
Field Value
- Color?
HoverFontOverride
public Font HoverFontOverride
Field Value
- Font
HoverFontSizeOverride
public int? HoverFontSizeOverride
Field Value
- int?
HoverRadiusPxOverride
public float? HoverRadiusPxOverride
Field Value
HoverScaleOverride
public float? HoverScaleOverride
Field Value
HoverTextColorOverride
public Color? HoverTextColorOverride
Field Value
- Color?
LockToMapRotationOverride
public bool? LockToMapRotationOverride
Field Value
- bool?
ModelUpIsYOverride
public bool? ModelUpIsYOverride
Field Value
- bool?
OffscreenMarginPxOverride
public float? OffscreenMarginPxOverride
Field Value
Scale
public float Scale
Field Value
SizeMode
public MarkerSizeMode SizeMode
Field Value
Properties
AltitudeMeters
public double AltitudeMeters { get; }
Property Value
AltitudeMode
How AltitudeMeters is interpreted. Default RelativeToGround: meters above sampled ground. See ResolveAltitudeMercator(MarkerAltitudeMode, double, LatLon, IElevationSampler).
public MarkerAltitudeMode AltitudeMode { get; }
Property Value
GameObject
public GameObject GameObject { get; }
Property Value
- GameObject
HoverText
public string HoverText { get; set; }
Property Value
Id
Slot+generation id the owning manager handed out. -1 until assigned. Use Ref to compare across tiers.
public int Id { get; }
Property Value
Label
public string Label { get; set; }
Property Value
Latitude
public double Latitude { get; }
Property Value
Longitude
public double Longitude { get; }
Property Value
Name
public string Name { get; set; }
Property Value
Ref
Cross-tier name for this GameObject marker.
public MarkerRef Ref { get; }
Property Value
ResolvedAltitudeMercator
The altitude actually used for rendering, in mercator units above the flat reference plane, after AltitudeMode resolution against sampled ground. Maintained by the owning WorldMarkerManager on every projection refresh; consumers that need the marker's real rendered position (such as MarkerPopup) read this instead of recomputing from AltitudeMeters directly, which would bypass mode resolution and terrain sampling.
public double ResolvedAltitudeMercator { get; }
Property Value
Tier
public MarkerTier Tier { get; }
Property Value
UsesColliderHitArea
public bool UsesColliderHitArea { get; }
Property Value
VisualBoundsRadius
Max distance in prefab-local units from the anchor (local origin) to any corner of any renderer's local bounds, composed child-to-root. Multiplied by the marker's apparent on-screen size to widen the offscreen-visibility margin (VisibilityMarginPx(double, double, double)). 1 when no render geometry is found - the pre-measurement assumption, so a renderer-less marker behaves exactly as before. Settable directly for models whose visual extent the measurement cannot see (procedural growth, animation extremes).
public float VisualBoundsRadius { get; set; }
Property Value
Methods
RefreshHitArea()
public void RefreshHitArea()
RefreshVisualBounds()
Re-measures VisualBoundsRadius from the render geometry currently under the marker GameObject. Called once at spawn, alongside RefreshHitArea(); call it again after adding, removing, or rescaling renderers on a live marker.
public void RefreshVisualBounds()
Remarks
Walks every UnityEngine.MeshRenderer (via its sibling
UnityEngine.MeshFilter) and UnityEngine.SkinnedMeshRenderer
under GameObject. Each one's authored local mesh
bounds (center + extents, axis-aligned in the child's own local
space) contributes its 8 corners, each transformed into the
root's local space by root.worldToLocalMatrix * child.localToWorldMatrix
- child-to-root composition, deliberate, because at spawn time
the root has not yet been posed by the manager, and a
world-space
Renderer.boundswould bake that arbitrary transient pose into the number. Corners, not the box's center/extent, because a child transform can rotate or non-uniformly scale the box, which the composed matrix carries correctly per corner but an axis-aligned center+extent reconstruction in root space would not. Each transformed corner feeds FarthestCornerDistance(double, double, double, double, double, double, double, double, double) as a zero-size box, so the same pure corner-distance law measures both this per-corner walk and the flag/tower cases its own test plan pins directly. Falls back to 1 when no renderer is found, or the composed radius comes out at or below 0, reproducing today's shipped "assume 1 local unit" behavior exactly.
SetPosition(double, double, double)
public void SetPosition(double lat, double lon, double altitudeMeters)
Parameters
SetPosition(double, double, double, MarkerAltitudeMode)
Moves the marker and/or changes how altitudeMeters
is interpreted.
public void SetPosition(double lat, double lon, double altitudeMeters, MarkerAltitudeMode altitudeMode)
Parameters
latdoubleLatitude in degrees WGS84.
londoubleLongitude in degrees WGS84.
altitudeMetersdoubleAuthored altitude in meters; meaning depends on
altitudeMode.altitudeModeMarkerAltitudeModeHow
altitudeMetersis resolved against sampled ground.
Events
PositionChanged
public event Action<WorldMarkerInstance> PositionChanged