Railcam 2D
Store

Rail

public class Railcam2D.Rail;

Represents a 2D path that the camera can traverse.

Public Members


Activate()

public void Activate();
Member Method
Returns void

A method that sets Active to true. Can be used with Unity Events to change the Rail's status at runtime.


Active

public bool Active = true;
Member Field
Type bool
Defaults To true

A bool that determines whether the Rail is included (true) or excluded (false) from camera position calculations.

Inactive Rails are only excluded from calculations performed using RailUtilities.GetCameraPosition(Vector2, Rail[]), which is the standard way Railcam 2D calculates camera position. This value is ignored when calling RailUtilities.GetCameraPosition(Vector2, Rail).


Deactivate()

public void Deactivate();
Member Method
Returns void

A method that sets Active to false. Can be used with Unity Events to change the Rail's status at runtime.


Effects

public List<Effect> Effects = new List<Effect>();
Member Field
Type List<Railcam2D.Effect>
Defaults To new List<Railcam2D.Effect>()

A list of Effects that displace the camera's position along the Rail.


Waypoints

public List<Waypoint> Waypoints = new List<Waypoint>();
Member Field
Type List<Railcam2D.Waypoint>
Defaults To new List<Railcam2D.Waypoint>()

A list of Waypoints that define the Rail's 2D path through a scene, and the axis the camera follows the target along.

Jonathan Madelaine © 2020