Class MarkerTrailRecorder
public sealed class MarkerTrailRecorder : MonoBehaviour
- Inheritance
-
objectObjectComponentBehaviourMonoBehaviourMarkerTrailRecorder
Fields
Map
[Tooltip("Map whose markers are trailed.")]
public BaseMapView Map
Field Value
MaxPoints
[Tooltip("Maximum trail points per marker.")]
public int MaxPoints
Field Value
SampleSeconds
[Tooltip("Seconds between trail samples.")]
public float SampleSeconds
Field Value
TrailColor
[Tooltip("Trail color.")]
public Color TrailColor
Field Value
- Color
WidthPx
[Tooltip("Trail width in screen pixels.")]
public float WidthPx
Field Value
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
colorColorNew trail color.
rebakeExistingboolWhen 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
markerMarkerRefBulk or prefab ref; must not be None or name a WorldBulk store, which this recorder cannot reach through Map.
Exceptions
- ArgumentException
markeris 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
markerPrefabMarkerInstance
Exceptions
- ArgumentNullException
markeris 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
markerIdint
Untrack(MarkerRef)
Stops recording and removes the trail line; a no-op for an untracked ref.
public void Untrack(MarkerRef marker)
Parameters
markerMarkerRef
Untrack(PrefabMarkerInstance)
Stops recording and removes the trail line; a no-op for an untracked marker.
public void Untrack(PrefabMarkerInstance marker)
Parameters
markerPrefabMarkerInstance
Exceptions
- ArgumentNullException
markeris null.
Untrack(int)
Stops recording and removes the trail line; a no-op for an untracked bulk marker.
public void Untrack(int markerId)
Parameters
markerIdint