Class CinemachineStoryboard
An add-on module for CinemachineCamera that places an image in screen space over the camera's output.
Inheritance
Inherited Members
Namespace: Unity.Cinemachine
Assembly: Unity.Cinemachine.dll
Syntax
[AddComponentMenu("Cinemachine/Procedural/Extensions/Cinemachine Storyboard")]
[ExecuteAlways]
[DisallowMultipleComponent]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.cinemachine@3.1/manual/CinemachineStoryboard.html")]
public class CinemachineStoryboard : CinemachineExtension
Fields
Alpha
The opacity of the image. 0 is transparent, 1 is opaque
Declaration
[Tooltip("The opacity of the image. 0 is transparent, 1 is opaque")]
[FormerlySerializedAs("m_Alpha")]
[Range(0, 1)]
public float Alpha
Field Value
Type | Description |
---|---|
float |
Aspect
How to handle differences between image aspect and screen aspect
Declaration
[Tooltip("How to handle differences between image aspect and screen aspect")]
[FormerlySerializedAs("m_Aspect")]
public CinemachineStoryboard.FillStrategy Aspect
Field Value
Type | Description |
---|---|
CinemachineStoryboard.FillStrategy |
Center
The screen-space position at which to display the image. Zero is center
Declaration
[Tooltip("The screen-space position at which to display the image. Zero is center")]
[FormerlySerializedAs("m_Center")]
public Vector2 Center
Field Value
Type | Description |
---|---|
Vector2 |
Image
The image to display
Declaration
[Tooltip("The image to display")]
[FormerlySerializedAs("m_Image")]
public Texture Image
Field Value
Type | Description |
---|---|
Texture |
MuteCamera
If checked, Camera transform will not be controlled by this virtual camera
Declaration
[Tooltip("If checked, Camera transform will not be controlled by this virtual camera")]
[FormerlySerializedAs("m_MuteCamera")]
public bool MuteCamera
Field Value
Type | Description |
---|---|
bool |
PlaneDistance
How far away from the camera is the storyboard's canvas generated.
Declaration
[Tooltip("How far away from the camera is the Canvas generated.")]
[FormerlySerializedAs("m_PlaneDistance")]
public float PlaneDistance
Field Value
Type | Description |
---|---|
float |
RenderMode
The render mode of the canvas on which the storyboard is drawn.
Declaration
[Tooltip("The render mode of the canvas on which the storyboard is drawn.")]
[FormerlySerializedAs("m_RenderMode")]
public CinemachineStoryboard.StoryboardRenderMode RenderMode
Field Value
Type | Description |
---|---|
CinemachineStoryboard.StoryboardRenderMode |
Rotation
The screen-space rotation to apply to the image
Declaration
[Tooltip("The screen-space rotation to apply to the image")]
[FormerlySerializedAs("m_Rotation")]
public Vector3 Rotation
Field Value
Type | Description |
---|---|
Vector3 |
Scale
The screen-space scaling to apply to the image
Declaration
[Tooltip("The screen-space scaling to apply to the image")]
[FormerlySerializedAs("m_Scale")]
public Vector2 Scale
Field Value
Type | Description |
---|---|
Vector2 |
ShowImage
If checked, the specified image will be displayed as an overlay over the virtual camera's output
Declaration
[Tooltip("If checked, the specified image will be displayed as an overlay over the virtual camera's output")]
[FormerlySerializedAs("m_ShowImage")]
public bool ShowImage
Field Value
Type | Description |
---|---|
bool |
SortingOrder
Allows ordering canvases to render on top or below other canvases.
Declaration
[Tooltip("Allows ordering canvases to render on top or below other canvases.")]
[FormerlySerializedAs("m_SortingOrder")]
public int SortingOrder
Field Value
Type | Description |
---|---|
int |
SplitView
Wipe the image on and off horizontally
Declaration
[Range(-1, 1)]
[Tooltip("Wipe the image on and off horizontally")]
[FormerlySerializedAs("m_SplitView")]
public float SplitView
Field Value
Type | Description |
---|---|
float |
SyncScale
If checked, X and Y scale are synchronized
Declaration
[Tooltip("If checked, X and Y scale are synchronized")]
[FormerlySerializedAs("m_SyncScale")]
public bool SyncScale
Field Value
Type | Description |
---|---|
bool |
s_StoryboardGlobalMute
If checked, all storyboards are globally muted
Declaration
[Tooltip("If checked, all storyboards are globally muted")]
public static bool s_StoryboardGlobalMute
Field Value
Type | Description |
---|---|
bool |
Methods
ConnectToVcam(bool)
Connect to virtual camera. Adds/removes listener
Declaration
protected override void ConnectToVcam(bool connect)
Parameters
Type | Name | Description |
---|---|---|
bool | connect | True if connecting, false if disconnecting |
Overrides
PostPipelineStageCallback(CinemachineVirtualCameraBase, Stage, ref CameraState, float)
Callback to display the image
Declaration
protected override void PostPipelineStageCallback(CinemachineVirtualCameraBase vcam, CinemachineCore.Stage stage, ref CameraState state, float deltaTime)
Parameters
Type | Name | Description |
---|---|---|
CinemachineVirtualCameraBase | vcam | The virtual camera being processed |
CinemachineCore.Stage | stage | The current pipeline stage |
CameraState | state | The current virtual camera state |
float | deltaTime | The current applicable deltaTime |