Skip to content

Setting up a Visual Controller

Razdvizh edited this page Nov 28, 2024 · 4 revisions

Introduction

Visual Controller is a core class that organizes scenarios and delegates visualization of their data.

Instantiation

Visual controller is a UObject which outer must be APlayerController. It can be instantiated inline in the editor or by calling NewObject function. Visual Controller Interface can be implemented by class that owns or provides access to visual controller.

Requirements

For operation during gameplay, Visual Controller requires First Data Table to be set and filled with at least one scenario, otherwise an assertion will be triggered.

Working with controller

Below is the list of common functions that are used to operate on visual controller:

  • VisualizeToScreen displays renderer on the screen with visualized data of the current scenario. Alternatively, renderer can be visualized to widget component.
  • Request next/previous scene
  • Request fast/auto move enables visual controller modes that are commonly found in visual novels. Auto and fast move modes can be cancelled using corresponding functions.
  • Request scenario requests previously "seen" scene. It works even when the scene is located in other data table. However, such scene request can succeed only on past scenes/nodes.
Clone this wiki locally