Table of Contents

Class MapPOIBuilder

Namespace
S1API.Map
Assembly
S1API.dll

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

id string

A 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

icon Sprite

Returns

MapPOIBuilder

WithLabel(string)

Sets the label displayed beside the marker.

public MapPOIBuilder WithLabel(string label)

Parameters

label string

Returns

MapPOIBuilder

WithPosition(Vector3)

Places the marker at a fixed world position.

public MapPOIBuilder WithPosition(Vector3 position)

Parameters

position Vector3

Returns

MapPOIBuilder

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

rotateWithTarget bool

Returns

MapPOIBuilder

WithTarget(Transform)

Binds the marker to a moving target.

public MapPOIBuilder WithTarget(Transform target)

Parameters

target Transform

Returns

MapPOIBuilder

WithTextVisibility(MapPOITextVisibility)

Controls when the marker label is displayed.

public MapPOIBuilder WithTextVisibility(MapPOITextVisibility visibility)

Parameters

visibility MapPOITextVisibility

Returns

MapPOIBuilder

WithVisibility(bool)

Sets the marker's initial visibility.

public MapPOIBuilder WithVisibility(bool visible)

Parameters

visible bool

Returns

MapPOIBuilder