Class CameraFramingData

Namespace
TDMaker.Unity.Authoring
Assembly
TDMaker.Unity.dll

Per-level camera framing for maps larger than the screen: how much of the map one screen shows, where the view starts and an optional intro pan along the first path. Read by TDCameraController; presentation only (no simulation effect).

public sealed class CameraFramingData
Inheritance
CameraFramingData
Inherited Members

Constructors

CameraFramingData()

public CameraFramingData()

Fields

introPan

Pans along the first path from its entrance to its exit when the level starts (any pan input skips it).

[Tooltip("Pan along the first path from its entrance to its exit when the level starts, then settle on the start focus. Any pan input skips it.")]
public bool introPan

Field Value

bool

introPanSeconds

Intro pan duration in seconds (unscaled time).

[Min(0.1)]
public float introPanSeconds

Field Value

float

mode

How the view is sized.

[Tooltip("Fit Whole Map, fit the map height (scroll sideways), fit the map width (scroll up/down) or a fixed view size (scroll both ways).")]
public CameraFramingMode mode

Field Value

CameraFramingMode

startFocus

Where the view starts.

public CameraStartFocus startFocus

Field Value

CameraStartFocus

viewHeight

Visible world height for FixedViewSize.

[Tooltip("Visible world height (units) for Fixed View Size. Capped so the view never shows past the map.")]
[Min(1)]
public float viewHeight

Field Value

float

Methods

Clone()

Creates a deep copy.

public CameraFramingData Clone()

Returns

CameraFramingData

OrthographicSize(Rect, float, bool)

Orthographic size (half the view height) for this framing: bounds are the camera bounds, aspect the screen aspect, and cover caps the view inside the bounds (fixed map rectangles) instead of fitting the bounds whole.

public float OrthographicSize(Rect bounds, float aspect, bool cover)

Parameters

bounds Rect
aspect float
cover bool

Returns

float