Presenting A Storyboard

Storyboards are presented from a scene. This could be a game scene, a menu scene, or any other content scene, over which the user interface is presented.

To present a storyboard, create a new game object in the scene, add the Storyboard component, and select your storyboard asset in the Storyboard field, as shown below. Run the scene and the storyboard will be presented.

Presenting a storyboard from an empty scene.

Note: A single Unity EventSystem is required to be present for canvases to receive input events. Therefore, depending on your game's structure, you may wish to place an Event System (Game Object/UI/Event System) in the scene presenting your storyboard.

Presenting In World Space

By default, storyboards are presented in screen space. To present a storyboard in world space, simply select the storyboard component in the scene and change its presentation space to World Space. This will cause the storyboard to be presented in world space and embedded within the specified container.

Presenting a storyboard in world space.

Note that any subsequent storyboard transitions, as well as manual calls to PresentCanvasController<T>(), will automatically detect whether they should be presented in world space or screen space. If the presenting canvas controller is in world space, the presented canvas controller will also be in world space. Likewise, if the presenting canvas controller is in screen space, the presented canvas controller will also be in screen space.

Callbacks

As shown above, three UnityEvent callbacks are available on a Storyboard component.

These callbacks can be particularly useful for passing scene data to the user interface, such as references to scene objects. For example, Canvas Flow's Floaty Cube example uses the StoryboardWillPresentInitialCanvasController callback to pass a reference to the player object to the initial game overlay screen. This allows the game overlay screen to display the player's current height. It is implemented like so:

public void OnGameStoryboardWillPresentInitialCanvasController(StoryboardTransition transition)
{
    var gameOverlayCanvasController =
        transition.DestinationCanvasController<FCGameOverlayCanvasController>();
    gameOverlayCanvasController.ConfigureWithPlayer(player);
}

Note: The callbacks pass a StoryboardTransition object, allowing you to access the canvas controllers involved.

For more information, please see the Storyboard component's documentation.