VisualU 1.2.1
Plugin for Unreal Engine 5 that brings core functionality for a widget-based visual novel game
 
Loading...
Searching...
No Matches
FScenario Struct Reference

Describes a single scene/entry/"frame" of UVisualController. More...

#include <Scenario.h>

Inheritance diagram for FScenario:
IInfoAssignable

Public Member Functions

FORCEINLINE const UDataTable * GetOwner () const
 
FORCEINLINE int32 GetIndex () const
 
virtual void OnPostDataImport (const UDataTable *InDataTable, const FName InRowName, TArray< FString > &OutCollectedImportProblems) override
 
virtual void OnDataTableChanged (const UDataTable *InDataTable, const FName InRowName) override
 
virtual void GetDataToLoad (TArray< FSoftObjectPath > &Out) const
 Provides assets that should be loaded into the memory.
 
virtual FString ToString () const
 String representation of scenario data.
 
FORCEINLINE FString GetDebugString () const
 String representation of this scenario for debugging purposes.
 
bool HasChoice () const
 
bool HasTransition () const
 
virtual void AssignScenarioVisualInfo (const FVisualScenarioInfo &InInfo) override
 Setter for FScenario::Info.
 
FORCEINLINE void Serialize (FArchive &Ar)
 
FORCEINLINE bool operator== (const FScenario &Other) const
 
FORCEINLINE bool operator!= (const FScenario &Other) const
 

Static Public Member Functions

static FScenarioResolveScene (const FScenario &Scene)
 Matches provided scene to its data stored in the data table.
 

Public Attributes

FVisualScenarioInfo Info
 Actual data of this scenario.
 

Protected Attributes

const UDataTable * Owner
 Node that owns this scenario.
 
int32 Index
 Position of this scenario in the node.
 

Private Member Functions

void Intrude (const UDataTable *InDataTable)
 Makes this scenario aware of its owner and its position.
 

Detailed Description

Describes a single scene/entry/"frame" of UVisualController.

Struct with data that describes one scene handled by UVisualController. Can be imported from CSV or JSON file or added directly as a row to the Data Table that has FScenario row struct. Terms "Scene" and "Scenario" in this plugin all refer to FScenario. Grouped together under Data Table, scenarios represent a node in the tree structure, granting ability to choose different narrative paths. The first scene, or root, together with its node in the tree is specified by UVisualUSettings::FirstDataTable. Connections between nodes can be placed in any scene in the current node, but make most sense in the last scene of the current node. Connections can be created by calling UVisualController::RequestNode(). Created connections are managed by UVisualController. That said, FScenario is a somewhat-intrusive data structure, that is well aware in what node it resides. That implies that FScenario must be a part of a node.

Note
FScenario is a polymorphic struct and can be extended if needed.
See also
FSprite UVisualController

Member Function Documentation

◆ AssignScenarioVisualInfo()

virtual void FScenario::AssignScenarioVisualInfo ( const FVisualScenarioInfo & InInfo)
inlineoverridevirtual

Setter for FScenario::Info.

Parameters
InInfoNew information for this scenario

◆ GetDataToLoad()

virtual void FScenario::GetDataToLoad ( TArray< FSoftObjectPath > & Out) const
inlinevirtual

Provides assets that should be loaded into the memory.

Note
said assets might be already loaded. Will empty Out.
Parameters
Outarray to be filled with data that should be loaded

◆ HasChoice()

bool FScenario::HasChoice ( ) const
inline
Returns
true when this scenario has EScenarioMetaFlags::Choice flag.

◆ HasTransition()

bool FScenario::HasTransition ( ) const
inline
Returns
true when this scenario has valid transition material.

◆ Intrude()

void FScenario::Intrude ( const UDataTable * InDataTable)
inlineprivate

Makes this scenario aware of its owner and its position.

Parameters
InDataTablethe owner of this scenario

◆ ResolveScene()

static FScenario * FScenario::ResolveScene ( const FScenario & Scene)
inlinestatic

Matches provided scene to its data stored in the data table.

Note
Used during serialization

Member Data Documentation

◆ Owner

const UDataTable* FScenario::Owner
protected

Node that owns this scenario.

Can be nullptr.

Note
Left undiscoverable by reflection to avoid circular references and intricacies of TWeakObjectPtr.

The documentation for this struct was generated from the following files: