VisualU 1.3.1
Plugin for Unreal Engine 5 that brings core functionality for a widget-based visual novel game
 
Loading...
Searching...
No Matches
UVisualSprite Class Reference

Class that represents a sprite that will be visualized by UVisualRenderer. More...

#include <VisualSprite.h>

Inheritance diagram for UVisualSprite:

Public Member Functions

 UVisualSprite (const FObjectInitializer &ObjectInitializer)
 
virtual void ReleaseSlateResources (bool bReleaseChildren) override
 Releases memory allocated for slate widgets.
 
virtual void AssignSpriteInfo (const TArray< FVisualImageInfo > &InInfo)
 Assigns provided information to visual images of this sprite.
 

Public Attributes

FOnSpriteDisappear OnSpriteDisappear
 Called when sprite is removed from canvas in the renderer.
 
FOnSpriteAppear OnSpriteAppear
 Called when sprite is being drawn by the renderer.
 

Detailed Description

Class that represents a sprite that will be visualized by UVisualRenderer.

Sprite in VisualU is a widget which appearance is governed by UVisualImage and lifetime is bound to the lifetime of the FScenario that is currently active in UVisualController. It is represented by FSprite struct in scene visual info. Visual sprite can contain scripts of a normal widget and can be extended as some specific kind of sprite.

Member Function Documentation

◆ AssignSpriteInfo()

void UVisualSprite::AssignSpriteInfo ( const TArray< FVisualImageInfo > & InInfo)
virtual

Assigns provided information to visual images of this sprite.

Default implementation will assign first image info to the first visual image, which is the one closest to the root of the Widget tree. (In Widget designer, the top most visual image will be the first, the down most will be the last). It will continue assigning fields in this manner until there is no visual images left in the tree. Any extra image info will be ignored.

◆ ReleaseSlateResources()

void UVisualSprite::ReleaseSlateResources ( bool bReleaseChildren)
overridevirtual

Releases memory allocated for slate widgets.

Parameters
bReleaseChildrenshould memory of child widgets be released

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