Class UnityRailFollowerView
MonoBehaviour that reads the current RailProgress from
IGameRailService and applies the sampled pose to a target transform.
Does NOT own rail state — it only consumes and visualises it.
Inheritance
UnityRailFollowerView
Assembly: Serenity.UnityGameRail.Infrastructure.dll
Syntax
public class UnityRailFollowerView : MonoBehaviour, IFoundationSettings
Constructors
UnityRailFollowerView()
Declaration
public UnityRailFollowerView()
Properties
ApplyOrientation
Declaration
public bool ApplyOrientation { get; set; }
Property Value
Guid
Declaration
public string Guid { get; set; }
Property Value
Id
Declaration
public string Id { get; set; }
Property Value
IsBound
Declaration
public bool IsBound { get; }
Property Value
LastPose
Declaration
public RailPoseSampler.PoseResult LastPose { get; }
Property Value
LookAheadEpsilon
Declaration
public float LookAheadEpsilon { get; set; }
Property Value
Phase
Declaration
public UnityRailFollowerView.UpdatePhase Phase { get; set; }
Property Value
RailIdValue
Declaration
public string RailIdValue { get; }
Property Value
Smoothing
Declaration
public float Smoothing { get; set; }
Property Value
Methods
Bind(IGameRailService)
Injects the rail service dependency. Called by the installer or composition root.
Declaration
public void Bind(IGameRailService railService)
Parameters
BindRail(IGameRailService, string)
Sets Serenity.GameRail.Infrastructure.Views.UnityRailFollowerView._railId and injects the rail service dependency in one call.
Additive convenience for callers that need to (re)assign the rail identity at bind
time — e.g. per-instance rails for pooled NPCs — without reaching for reflection to
set the otherwise-private Serenity.GameRail.Infrastructure.Views.UnityRailFollowerView._railId field.
Declaration
public void BindRail(IGameRailService railService, string railId)
Parameters
| Type |
Name |
Description |
| IGameRailService |
railService |
The rail service to bind to.
|
| string |
railId |
The rail identity this view should sample.
|
Implements