Class MapPOIBuilder
Builds standalone points of interest for the phone map.
public sealed class MapPOIBuilder
- Inheritance
-
MapPOIBuilder
- Inherited Members
- Extension Methods
Constructors
MapPOIBuilder(string)
Creates a builder for a uniquely identified map marker.
public MapPOIBuilder(string id)
Parameters
idstringA stable, mod-namespaced identifier such as
my-mod:supplier-stash.
Methods
Build()
Registers the marker and starts its deferred native initialization.
public MapPOI Build()
Returns
- MapPOI
A managed handle that can update or remove the marker.
WithIcon(Sprite?)
Sets an optional custom icon. When omitted, the native marker appearance is retained.
public MapPOIBuilder WithIcon(Sprite? icon)
Parameters
iconSprite
Returns
WithLabel(string)
Sets the label displayed beside the marker.
public MapPOIBuilder WithLabel(string label)
Parameters
labelstring
Returns
WithPosition(Vector3)
Places the marker at a fixed world position.
public MapPOIBuilder WithPosition(Vector3 position)
Parameters
positionVector3
Returns
Remarks
This clears any target previously supplied with WithTarget(Transform).
WithRotation(bool)
Controls whether the icon rotates with the marker transform's world-space heading.
public MapPOIBuilder WithRotation(bool rotateWithTarget = true)
Parameters
rotateWithTargetbool
Returns
WithTarget(Transform)
Binds the marker to a moving target.
public MapPOIBuilder WithTarget(Transform target)
Parameters
targetTransform
Returns
WithTextVisibility(MapPOITextVisibility)
Controls when the marker label is displayed.
public MapPOIBuilder WithTextVisibility(MapPOITextVisibility visibility)
Parameters
visibilityMapPOITextVisibility
Returns
WithVisibility(bool)
Sets the marker's initial visibility.
public MapPOIBuilder WithVisibility(bool visible)
Parameters
visiblebool