Blueprint Interface Documentation
- ABookMenuActor
- ABookMenuInteractionActor
- UBookMenuData
- UBookMenuAnimInstance
- UBookMenuComponent
- UBookMenuInteractionComponent
- UBookMenuStatics
- UBookPageWidget
ABookMenuActor
Properties
Property Name | Type | Access | Description |
BookMenuData | UBookMenuData | EditAnywhere | Default Configuration Data for the Book, containing information such as the the widgets to be displayed as book pages |
SkeletalMeshComponent | USkeletalMeshComponent | VisibleAnywhere, BlueprintReadOnly | The animated book mesh |
StaticMeshComponent | UStaticMeshComponent | VisibleAnywhere, BlueprintReadOnly | A dummy static mesh component for doing traces. Needed to determine the UV coordinates based on trace hit results. The static mesh will be hidden in game. Must represent the book in a open state. |
LeftPageCollision | UBoxComponent | VisibleAnywhere, BlueprintReadOnly | Collision box used to determine which page of the book was traced |
RightPageCollision | UBoxComponent | VisibleAnywhere, BlueprintReadOnly | Collision box used to determine which page of the book was traced |
InteractionActor | ABookMenuInteractionActor | EditAnywhere, BlueprintReadOnly | Reference to the actor that redirects the interaction to a widget interaction component |
Functions
Set Book Menu Data
Can be used to set the book menu data after begin play, during the game
Pin | Direction | Type | Description |
In Book Menu Data | Input | UBookMenuData | The new Book Menu Data. Will be cloned internally. |
Get Book Menu Data
Can be used to set the book menu data after begin play, during the game
Pin | Direction | Type | Description |
Return Value | Output | UBookMenuData | A clone of the current Book Menu Data |
Get Current Page Section Index
Can be used to get the current page section index. The page section index indicates the currently shown pair of pages. (Index of the PageSection Array inside the BookMenuData)
Pin | Direction | Type | Description |
Return Value | Output | Integer | the current page section index; -1 in case Anim Instance is not defined |
Get Pending Page Section Index
Can be used to get the pending page section index. The pending page section index indicates the currently pending pair of pages while switching pages is in progress.
Pin | Direction | Type | Description |
Return Value | Output | Integer | the pending page section index; -1 in case Anim Instance is not defined |
Get Current Page Index
Can be used to get the index of the current page, where the interaction pointer points on.
Pin | Direction | Type | Description |
Return Value | Output | Integer | the current page index 0 = Left ; 1 = Right returns -1 in case Anim Instance is not defined |
Get Book Is Open
Can be used to check if the book is in an opened state
Pin | Direction | Type | Description |
Return Value | Output | Boolean | true if the book is in open state; false if the book is in closed state |
Get Book Should Open
Can be used to check if the book should be in an opened state but opening is still in progress.
Pin | Direction | Type | Description |
Return Value | Output | Boolean | true if the book should be in open state |
Get Book Should Close
Can be used to check of the book should be in a closed state but closing is still in progress.
Pin | Direction | Type | Description |
Return Value | Output | Boolean | true if the book should be in closed state |
Get Page Sections
Can be used to get the Page Sections.
Pin | Direction | Type | Description |
Return Value | Output | TMap<int32,FPageSectionDataStruct> | an Map of the page sections of the book |
Get Interaction Actor
Returns the reference to the Book Menu Interaction Actor
Pin | Direction | Type | Description |
Return Value | Output | ABookMenuInteractionActor | Returns the reference to the Book Menu Interaction Actor |
Set Interaction Actor
Registers the Book Menu Interaction Actor to be used for Interaction with the Book
Pin | Direction | Type | Description |
In Interaction Actor | Input | ABookMenuInteractionActor | The Book Menu Interaction Actor to be set |
Register Interaction Component
Method to register a Book Menu Interaction Component
Pin | Direction | Type | Description |
In Interaction Component | Input | UBookMenuInteractionComponent | The Book Menu Interaction Component to be registered. |
Register Interaction Actor
Method to register a Book Menu Interaction Component
Pin | Direction | Type | Description |
In Interaction Actor | Input | UBookMenuInteractionActor | The Book Menu Interaction Actor to be registered. |
Jump to Page Section
Determines if a forward or backward page turn need to be performed based on the current page section index.
Pin | Direction | Type | Description |
Section Index | Input | int32 | The index of the Page Section to be displayed |
Open Book At
If the book is closed, this triggers the open book animation and upfront sets the correct section to display.
Pin | Direction | Type | Description |
Section Index | Input | int32 |
The Page Section Index to be displayed while opening the book |
Close Book
Triggers the Close Book animation
Pause Book Update
Pauses the animation update of the anim instance without closing the book first.
Resume Book Update
Resume the animation update of the anim instance. Will only resume if the book is already open. Closed books don't need to consume render time
Interact
Performs a Line Trace based on the Start and End Parameters and moves the Widget Interaction pointer of the Book Menu Interaction Actor if it is set. Also tells the Animation Blueprint which page was traced to.
Pin | Direction | Type | Description |
Start | Input | FVector |
Start of the Line Trace |
End | Input | FVector |
End of the Line Trace |
Debug Trace | Input | bool |
Shows a debug trace if true. |
Trace Channel | Input | ECollisionChannel |
The Collision Channel to be used for the line trace. |
Success | Output | EXEC |
Indicates if the Interaction was executed successfully |
Failed | Output | EXEC |
Indicates if the Interaction was not executed successfully |
Return Value | Output | bool |
returns tru if the operation was successful. Otherwise false |
InteractExt (Release 1.4+)
Performs a Line Trace based on the Start and End Parameters and moves the Widget Interaction pointer of the Book Menu Interaction Actor if it is set. Also tells the Animation Blueprint which page was traced to.
Pin | Direction | Type | Description |
Start | Input | FVector |
Start of the Line Trace |
End | Input | FVector |
End of the Line Trace |
OutUVCoordinates | Output | FVectro2d |
The UV coordinates of the traced page |
Debug Trace | Input | bool |
Shows a debug trace if true. |
Trace Channel | Input | ECollisionChannel |
The Collision Channel to be used for the line trace. |
Success | Output | EXEC |
Indicates if the Interaction was executed successfully |
Failed | Output | EXEC |
Indicates if the Interaction was not executed successfully |
Return Value | Output | bool |
returns tru if the operation was successful. Otherwise false |
Set Keyboard Focus
Pin | Direction | Type | Description |
In Page Index | Input | Integer |
The page index to set the focus to |
Debug Trace | Input | bool |
Shows a debug trace if true. |
Success | Output | EXEC |
Indicates if the Interaction was executed successfully |
Failed | Output | EXEC |
Indicates if the Interaction was not executed successfully |
Return Value | Output | bool |
returns tru if the operation was successful. Otherwise false |
Get Anim Instance
Returns the Animation Instance of the Animation Blueprint
Pin | Direction | Type | Description |
Return Value | Output | UBookMenuAnimInstance |
|
Get Left Page Collision Box
Returns the Collision Box of the left page
Pin | Direction | Type | Description |
Return Value | Output | UBoxComponent |
Get Right Page Collision Box
Returns the Collision Box of the right page
Pin | Direction | Type | Description |
Return Value | Output | UBoxComponent |
Get Static Mesh Component
Returns the Static Mesh Component
Pin | Direction | Type | Description |
Return Value | Output | UStaticMeshComponent |
ABookMenuInteractionActor
Properties
Property Name | Type | Access | Description |
WidgetInteractionComponent | UWidgetInteractionComponent | VisibleAnywhere, BlueprintReadOnly | The widget interaction component used to redirect the book interaction onto a Widget Component |
PageWidgetComponentA | UWidgetComponent | VisibleAnywhere, BlueprintReadOnly | The widget component used to display the first page |
PageWidgetComponentB | UWidgetComponent | VisibleAnywhere, BlueprintReadOnly | The widget component used to display the second page |
PageWidgetComponentC | UWidgetComponent | VisibleAnywhere, BlueprintReadOnly | The widget component used to display the third page |
PageWidgetComponentD | UWidgetComponent | VisibleAnywhere, BlueprintReadOnly | The widget component used to display the fourth page |
ActiveWidgetComponent | UWidgetComponent | VisibleAnywhere, BlueprintReadOnly | The widget component which is currently under interaction |
DrawSize | UStaticMeshComponent | VisibleAnywhere, BlueprintReadOnly | The Draw Size of the Widget. User Widgets and Render Targets must have the same resolution. Will be set via the Book Menu Data of the Book Menu Actor |
Functions
Move Pointer
Calculates the world location on the Page Widget based on the UV Coordinates of the Book Actors Book Mesh
Pin | Direction | Type | Description |
UV Coordinates | Input | FVector2D | UV Coordinates of the Book Page |
Debug Trace | Input | bool | Shows a debug trace if true |
Return Value | Output | bool | returns true if the operation was successful. Otherwise false. |
Reset Pointer
Sets the Interaction Pointer to a safe spot which triggers no interaction
Pin | Direction | Type | Description |
Debug Trace | Input | bool | Shows a debug trace if true |
Return Value | Output | bool | returns true if the operation was successful. Otherwise false. |
Get Interaction Component
returns the Widget Interaction Component. Can be used to do further interaction with the widget such as send keys etc.
Pin | Direction | Type | Description |
Return Value | Output | UWidgetInteractionComponent |
UBookMenuData
Properties
Property Name | Type | Access | Description |
SkeletalMesh | USkeletalMesh | EditAnywhere | The Skeletal Mesh to be set after Begin Play |
AnimInstanceClass | TSubclassOf<UBookMenuAnimInstance> | EditAnywhere | The Animation Blueprint class to be set after Begin Play |
PageMaterialIndexMapping | FPageMaterialIndexMapping | EditAnywhere | Mapping that tells us which Material Index of the Skeletal Mesh shall be used for which Page |
DefaultPageSection | FPageSectionDataStruct | EditAnywhere, BlueprintReadWrite | The Default Page Section to be used if no concrete Page Section is defined |
PageSections | TArray<FPageSectionDataStruct> | EditAnywhere, BlueprintReadWrite | List of Page Sections to be used inside the Book Menu Actor |
CoverMaterial | UMaterialInterface | EditAnywhere, BlueprintReadWrite | Material for the Cover |
bBookBeginsPlayOpen | bool | EditAnywhere, BlueprintReadWrite | If the book shall begin play in an open state or closed state |
StartPageSection | int32 | EditAnywhere, BlueprintReadWrite | If the book shall begin play in an open state, this is the page section to open the book at. Can also be accessed by the Book Menu Actor to handle respective behavior. |
DrawSize | FVector2D | EditDefaultsOnly | Draw Size of the Render Targets and the Widgets. Used to set the Draw Size on all involved Actors and components |
RedrawTime (Release 1.4+) | float | EditDefaultsOnly | Time between redraws. if 0 we would redraw every frame |
Functions
No functions
UBookMenuAnimInstance
Properties
Property Name | Type | Access | Description |
BookMenuActor | ABookMenuActor | BlueprintReadOnly | The Owning Book Menu Actor |
PageSections | TMap<int32,FPageSectionDataStruct> | BlueprintReadOnly | List of all available Page Sections of the current book |
PageTextureA | UTextureRenderTarget2D | BlueprintReadWrite | Texture Render Target of the page one. Left side. |
PageTextureB | UTextureRenderTarget2D | BlueprintReadWrite | Texture Render Target of the page two. Right side. |
PageTextureC | UTextureRenderTarget2D | BlueprintReadWrite | Texture Render Target of the page three. Backside of page two. |
PageTextureD | UTextureRenderTarget2D | BlueprintReadWrite | Texture Render Target of the page four. Backside of page one. |
MaterialPageA | UMaterialInstanceDynamic | BlueprintReadWrite | Dynamic Material Instance of page one. Must have a Texture Parameter called BC |
MaterialPageB | UMaterialInstanceDynamic | BlueprintReadWrite | Dynamic Material Instance of page two. Must have a Texture Parameter called BC |
MaterialPageC | UMaterialInstanceDynamic | BlueprintReadWrite | Dynamic Material Instance of page three. Must have a Texture Parameter called BC |
MaterialPageD | UMaterialInstanceDynamic | BlueprintReadWrite | Dynamic Material Instance of page four. Must have a Texture Parameter called BC |
MaterialCover | UMaterialInstanceDynamic | BlueprintReadWrite | Dynamic Material Instance of The Cover. |
PageSectionAIndex | int32 | BlueprintReadOnly | Page Section Index for Pages one and two |
PageSectionBIndex | int32 | BlueprintReadOnly | Page Section Index for Pages three and four |
DefaultPageSection | FPageSectionDataStruct | BlueprintReadOnly | The Default Page Section in case there is no defined page section. |
CurrentPageSectionIndex | int32 | BlueprintReadOnly | The Current Page Section Index to be displayed on page one and two |
CurrentPageIndex | int32 | BlueprintReadOnly | The current Page the Interaction point on. Can be either the Left or the Right Page. |
PendingPageSectionIndex | int32 | BlueprintReadOnly | The Page Section Index that is pending while switching pages. |
DrawSize | FVector2D | BlueprintReadOnly | The Draw Size of the render targets. Must match the Widget Component Draw Size of the Book Interaction Actor. |
bBookIsOpen | bool | EditAnywhere, BlueprintReadOnly | Indicates if the book is or shall be in an opened state |
bBookShouldOpen | bool | BlueprintReadWrite | Indicates if the book should open |
bBookShouldClose | bool | BlueprintReadWrite | Indicates if the book should close |
bBookShouldSetKeyboardFocus | bool | BlueprintReadOnly | Indicates if KeyboardFocus is pending |
Functions
Set Page Sections
Sets or replaces the current list of Page sections
Pin | Direction | Type | Description |
InPageSections | Input | TArray<FPageSectionDataStruct> | List of Page Sections to be set. |
Init
Method to Initialize the Animation Instance and set configurations such as Book Data.
Pin | Direction | Type | Description |
InData | Input | UBookMenuData | The Book Menu Data |
InBookMenuActor | Inout | ABookMenuActor | The Book Menu Actor |
Jump to Page Section
Determines if a forward or backward page turn need to be performed based on the current page section index.
Pin | Direction | Type | Description |
SectionIndex | Input | int32 | the index of the Page Section to be displayed |
Open Book At
If the book is closed, this triggers the open book animation and upfront sets the correct section to display.
Pin | Direction | Type | Description |
SectionIndex | Input | int32 | The Page Section Index to be displayed while opening the book |
Close Book
Triggers the Close Book animation
Play Page Turn Forward Anim
34yv0-ma Method to be overwritten in the Anim Blueprint. Shall start the Page Turn forward animation.
Play Page Turn Reverse Anim
Method to be overwritten in the Anim Blueprint. Shall start the Page Turn backward animation.
Play Open Book Anim
5kdaq6c5 Method to be overwritten in the Anim Blueprint. Shall start the Open Book animation.
Play Close Book Anim
Method to be overwritten in the Anim Blueprint. Shall start the Close Book animation.
Play Idle Book Anim
Method to be overwritten in the Anim Blueprint. Shall start the Idle animation.
On Page Turn Anim End
If the book is closed, this triggers the open book animation and upfront sets the correct section to display.
Pin | Direction | Type | Description |
IsTurnForward | Input | bool | Indicates if a page forward (true) or a page backward (false) animation was executed. |
On Book Open Anim End
Method to be called at the end of the Open Book Animation. You want to use Anim Notifies to find out when to call this Method.
On Book Close Anim End
Method to be called at the end of the Close Book Animation. You want to use Anim Notifies to find out when to call this Method.
On Book Idle Anim End
Method to be called at the end of the Idle Book Animation. e.g. to restart the Idle animation. You want to use Anim Notifies to find out when to call this Method.
On Paused
Called when the Anim Blueprint gets Paused to do some "pausing" stuff in the Blueprint
On Resumed
Called when the Anim Blueprint gets Resumed to do some "resuming" stuff in the Blueprint
UBookMenuComponent
Properties
Property Name | Type | Access | Description |
BookMenuActor | ABookMenuActor | VisibleAnywhere, BlueprintReadOnly | The spawned Book Menu Actor |
BookMenuData | UBookMenuData | VisibleAnywhere, BlueprintReadOnly | The Book Menu Data to initialize the spawned Book Menu Actor |
BookMenuActorClass | TSubclassOf<ABookMenuActor> | VisibleAnywhere, BlueprintReadOnly | The Class of the Book Menu Actor to be spawned at Begin Play |
Functions
Register Interaction Component
Calculates the world location on the Page Widget based on the UV Coordinates of the Book Actors Book Mesh
Pin | Direction | Type | Description |
In Interaction Component | Input |
Register Interaction Actor
Calculates the world location on the Page Widget based on the UV Coordinates of the Book Actors Book Mesh
Pin | Direction | Type | Description |
In Interaction Actor | Input |
Interact
Performs a Line Trace based on the Start and End Parameters and moves the Widget Interaction pointer of the Book Menu Interaction Actor if it is set. Also tells the Animation Blueprint which page was traced to.
Pin | Direction | Type | Description |
Start | Input | FVector |
Start of the Line Trace |
End | Input | FVector |
End of the Line Trace |
Debug Trace | Input | bool |
Shows a debug trace if true. |
Trace Channel | Input | ECollisionChannel |
The Collision Channel to be used for the line trace. |
Success | Output | EXEC |
Indicates if the Interaction was executed successfully |
Failed | Output | EXEC |
Indicates if the Interaction was not executed successfully |
Return Value | Output | bool |
returns true if the operation was successful. Otherwise false |
Interact Ext
Performs a Line Trace based on the Start and End Parameters and moves the Widget Interaction pointer of the Book Menu Interaction Actor if it is set. Also tells the Animation Blueprint which page was traced to.
Pin | Direction | Type | Description |
Start | Input | FVector |
Start of the Line Trace |
End | Input | FVector |
End of the Line Trace |
Out UV Coordinates | Output | FVector2d |
The UV Coordinate of the trace page |
Debug Trace | Input | bool |
Shows a debug trace if true. |
Trace Channel | Input | ECollisionChannel |
The Collision Channel to be used for the line trace. |
Success | Output | EXEC |
Indicates if the Interaction was executed successfully |
Failed | Output | EXEC |
Indicates if the Interaction was not executed successfully |
Return Value | Output | bool |
returns true if the operation was successful. Otherwise false |
UBookMenuInteractionComponent
Properties
Property Name | Type | Access | Description |
BookMenuInteractionActorClass | TSubclassOf<ABookMenuInteractionActor> | EditAnywhere | The Class of the Book Menu Interaction Actor to be spawned at Begin Play |
InteractionActor | ABookMenuInteractionActor | BlueprintReadOnly | The spawned Book Menu Interaction Actor |
Functions
Get Widget Interaction Component
returns the Widget Interaction Component
Pin | Direction | Type | Description |
Return Value | Output | UWidgetInteractionComponent |
UBookMenuStatics
Properties
The static Blueprint Function Library does not define any properties.
Functions
Create Mouse Trace Parameters
Description
Method to translate the mouse position into trace parameters such as start and end
Pin | Direction | Type | Description |
Player Controller | Input | APlayerController | The Player controller |
Trace Distance | Input | float | The distance (length) used to perform the trace |
Success | Output | EXEC | Indicates if the operation was successful |
Failed | Output | EXEC | Indicates if the operation was failed |
Out Start | Output | FVector | The resulting Start Coordinate of the Trace Parameters |
Out End | Output | FVector | he resulting End Coordinate of the Trace Parameters |
Move Widget Interaction Pointer
Description
Calculates the world location on the Page Widget based on the UV Coordinates of the Book Actors Book Mesh
Pin | Direction | Type | Description |
In Widget Interaction Component | Input | UWidgetInteractionComponent | The Widget Interaction Component that shall be influenced |
In Widget Component | Input | UWidgetComponent | The Widget Component the Pointer shall be moved on |
In Reference Rotation | Input | FRotator | A reference rotation in order to do some relative calculations. e.g. the World Rotation of the Book Interaction Actor. |
UV Coordinates | Input | FVector2D | UV Coordinates to be translated onto the Widget |
Debug Trace | Input | bool | shows a debug trace if true. |
Return Value | Output | bool | returns true if the operation was successful. Otherwise false. |
Book Uv Trace
Description
Creates a trace based on the given collision channel. If a Book Men uActor was hit the Method determines if the book was hit from the front and tries to determine the current page and the UV Coordinates. This requires the Project Settings to be set to use the generation of UV coordinates from hit results.
Pin | Direction | Type | Description |
Book Menu Actor | Input | ABookMenuActor | The Book Menu Actor we ar looking for |
Start | Input | FVector | Start of the Trace |
End | Input | FVector | End of the Trace |
Debug Trace | Input | bool | shows a debug trace if true |
Trace Channel | Input | ECollisionChannel | The Collision Channel to be used for the Trace |
Out UV Coordinates | Output | FVector2D | The found UV Coordinates |
Out Page Index | Output | int32 | The found page index 0 = Left ; 1 = Right |
Return Value | Output | bool | returns true if the operation was successful. Otherwise false. |
Get Local Player Controller
Description:
Method to get the First local Player Controller based on the World Context
Create Texture Render Target 2D
Description
Creates a new Render Target with the specified parameters
Parameter | Direction | Type | Description |
Draw Size | Input | FVector2D | The DrawSize of the Render Target |
Filter | Input | TextureFilter | The Texture Filter to be applied |
Use Gamma Correction | Input | bool | Uses Gamma Correction if true |
Return Value | Output | UTextureRenderTarget2D | returns the created Render Target |
Draw UserWidget to Render Target 2D
Description
Method to render a UserWidget onto a TextureRenderTarget2D
Parameter | Direction | Type | Description |
User Widget | Input | UUserWidget | The UserWidget to be rendered |
Render Target | Input | UTextureRenderTarget2D | The Target to be rendered on |
Draw Size | Input | FVector2D | The DrawSize of the Render Target |
Delta Time | Input | float | Delta time |
Use Gamma Correction | Input | bool | Uses Gamma Correction if true |
UBookPageWidget
Properties
Property Name | Type | Access | Description |
BookMenuActor | ABookMenuActor | EditAnywhere | The Owning Book Menu Actor of the widget. Can be used to control the Book Menu actor from the widget |
PageSectionIndex | int32 | VisibleAnywhere, BlueprintReadOnly | The page section index of this widget. Can be used for navigation. |
PageIndex | int32 | VisibleAnywhere, BlueprintReadOnly | The page index. 0 = Left page, 1 = Right page |
Functions
Init
Method to initialize the most important data in the Widget
Pin | Direction | Type | Description |
InBookMenuActor | Input | ABookMenuActor | The Owning Book Menu Actor of the widget. Can be used to control the Book Menu actor from the widget |
InPageSectionIndex | Input | int32 | The page section index of this widget. Can be used for navigation. |
InPageIndex | Input | int32 | The page index. 0 = Left page, 1 = Right page |
OnSetKeyboardFocus
Use this event to handle custom code after the widget received keyboard focus. This function is the counter part the SetKeyBoardFocus Function of the BookMenuActor.