Table of Contents

Class MarkerTrailRecorder

Namespace
LansMap.Lines
Assembly
LansMap.Runtime.dll
public sealed class MarkerTrailRecorder : MonoBehaviour
Inheritance
object
Object
Component
Behaviour
MonoBehaviour
MarkerTrailRecorder

Fields

Map

[Tooltip("Map whose markers are trailed.")]
public BaseMapView Map

Field Value

BaseMapView

MaxPoints

[Tooltip("Maximum trail points per marker.")]
public int MaxPoints

Field Value

int

SampleSeconds

[Tooltip("Seconds between trail samples.")]
public float SampleSeconds

Field Value

float

TrailColor

[Tooltip("Trail color.")]
public Color TrailColor

Field Value

Color

WidthPx

[Tooltip("Trail width in screen pixels.")]
public float WidthPx

Field Value

float

Methods

Sample()

Appends one trail sample for every tracked marker right now, bypassing the SampleSeconds real-time gate.

public void Sample()

Remarks

For a driver that wants exactly one sample per call (e.g. a deterministic per-frame marketing capture) - ordinary runtime use should let LansMap.Lines.MarkerTrailRecorder.Update() gate this on SampleSeconds instead of calling it directly.

SetColor(Color, bool)

Sets the color trails are drawn with.

public void SetColor(Color color, bool rebakeExisting = false)

Parameters

color Color

New trail color.

rebakeExisting bool

When true, also recolors every point already recorded for every currently tracked marker, not just samples taken from now on.

Track(MarkerRef)

Starts recording a trail behind one marker of either tier; a no-op if it is already tracked.

public void Track(MarkerRef marker)

Parameters

marker MarkerRef

Bulk or prefab ref; must not be None or name a WorldBulk store, which this recorder cannot reach through Map.

Exceptions

ArgumentException

marker is none or names a WorldBulk store.

Track(PrefabMarkerInstance)

Starts recording a trail behind a GameObject marker; same as Track(marker.Ref).

public void Track(PrefabMarkerInstance marker)

Parameters

marker PrefabMarkerInstance

Exceptions

ArgumentNullException

marker is null.

Track(int)

Starts recording a trail behind a bulk marker of Map; same as Track(MarkerRef.Bulk(markerId)).

public void Track(int markerId)

Parameters

markerId int

Untrack(MarkerRef)

Stops recording and removes the trail line; a no-op for an untracked ref.

public void Untrack(MarkerRef marker)

Parameters

marker MarkerRef

Untrack(PrefabMarkerInstance)

Stops recording and removes the trail line; a no-op for an untracked marker.

public void Untrack(PrefabMarkerInstance marker)

Parameters

marker PrefabMarkerInstance

Exceptions

ArgumentNullException

marker is null.

Untrack(int)

Stops recording and removes the trail line; a no-op for an untracked bulk marker.

public void Untrack(int markerId)

Parameters

markerId int