Skip to content

Replicated Canvas Widget Base

Cutter H edited this page Jul 28, 2025 · 1 revision

Replicated Canvas Widget Base (UUserWidget)

#include "Canvas/ReplicatedCanvasWidgetBase.h"

Variables

  • BoardName (Name)
    • Used to identify this board between players.
  • BoardID (integer)
    • Used to identify this board between instances on the same player. If left as 0 it will be given a unique id.
  • PenData (CanvasPenData)
    • This is used as parameters to draw lines.
  • EraseTime (float)
    • Amount of time in seconds before lines disappear.
  • FadeDuration (float)
    • Amount of time prior to being erased where the lines will fade.

Functions

  • Name GetDrawerName()
    • Override to change how the drawer is identified. By default, GetPlayerName from the player state is used, but this is included if other means should be used.
  • bool ShouldDraw()
    • Override for custom logic to let the user draw. If this is false then no drawing occurs.
  • bool ShouldDrawLine(CanvasLineData)
    • Override for custom logic to check if a line should be drawn.
  • Array GetLineData()
    • This is the data the widget currently has of all the lines. These are ordered by time drawn.
  • ReplicatedCanvasManager GetManagerActor()
    • Getter for the Canvas Manager. This is used to receive replicated data.
  • CanvasPlayerStateHelper GetPlayerStateHelper()
    • Getter for the Player State component. This is used to send requests to the server.
Clone this wiki locally