Class MapPOI
A managed handle for a standalone point of interest on the phone map.
public sealed class MapPOI : IDisposable
- Inheritance
-
MapPOI
- Implements
- Inherited Members
- Extension Methods
Properties
Icon
The marker's custom icon, or null for the native appearance.
public Sprite? Icon { get; }
Property Value
- Sprite
Id
The stable identifier used to register this marker.
public string Id { get; }
Property Value
IsReady
Whether the native POI component has been created.
public bool IsReady { get; }
Property Value
IsRemoved
Whether this handle has been removed or invalidated by a scene change.
public bool IsRemoved { get; }
Property Value
IsUIReady
Whether the phone map has created this marker's UI.
public bool IsUIReady { get; }
Property Value
IsVisible
The requested marker visibility.
public bool IsVisible { get; }
Property Value
Label
The marker's current display label.
public string Label { get; }
Property Value
Position
The marker's current world position.
public Vector3 Position { get; }
Property Value
- Vector3
RotateWithTarget
Whether the marker icon rotates with its target heading.
public bool RotateWithTarget { get; }
Property Value
Target
The moving target currently followed by the marker, if any.
public Transform? Target { get; }
Property Value
- Transform
TextVisibility
Controls when the marker label is displayed.
public MapPOITextVisibility TextVisibility { get; }
Property Value
UI
The live map UI transform, or null until it is available.
public RectTransform? UI { get; }
Property Value
- RectTransform
Methods
Dispose()
public void Dispose()
Focus(bool)
Focuses the phone map on this marker.
public bool Focus(bool openMap = true)
Parameters
openMapboolWhether to open the phone map before focusing it.
Returns
Remove()
Removes the marker and releases its native objects.
public bool Remove()
Returns
SetIcon(Sprite?)
Updates or clears the marker's custom icon.
public MapPOI SetIcon(Sprite? icon)
Parameters
iconSprite
Returns
SetLabel(string)
Updates the marker label.
public MapPOI SetLabel(string label)
Parameters
labelstring
Returns
SetPosition(Vector3)
Moves the marker to a fixed world position and clears its moving target.
public MapPOI SetPosition(Vector3 position)
Parameters
positionVector3
Returns
SetRotation(bool)
Updates whether the marker icon rotates with its target heading.
public MapPOI SetRotation(bool rotateWithTarget)
Parameters
rotateWithTargetbool
Returns
SetTarget(Transform)
Binds the marker to a moving target.
public MapPOI SetTarget(Transform target)
Parameters
targetTransform
Returns
SetTextVisibility(MapPOITextVisibility)
Updates when the marker label is displayed.
public MapPOI SetTextVisibility(MapPOITextVisibility visibility)
Parameters
visibilityMapPOITextVisibility
Returns
SetVisible(bool)
Shows or hides the marker.
public MapPOI SetVisible(bool visible)
Parameters
visiblebool