Skip to content
Cutter H edited this page Jul 28, 2025 · 3 revisions

Welcome to the ReplicatedDrawingWidgetPlugin wiki!

Module: ReplicatedDrawingWidgetPlugin (Runtime)

There are several naming conventions in the plugin using "Canvas". This does not mean it uses a canvas widget, but was used due to the widget acting as a drawing canvas. The widget itself is a UUserWidget that is composed of an Overlay for its root and a Border widget with 0 Render Opacity to receive your mouse inputs.

Classes

  • Replicated Canvas Widget Base (UUserWidget)
    • This is the main widget of the plugin. You shouldn't have to interact with the other classes in general usage.
  • World Canvas Subsystem (UWorldSubsystem)
    • Used for quick interaction between the widget and the manager. This spawns the manager on the server on world load.
  • Replicated Canvas Manager (AInfo)
    • Holds and receives lines created in the widgets.
  • Canvas Player State Helper (UActorComponent)
    • This is spawned on all player states on the server. It's lightweight and allows the widget to send data to the server.

Enums and Structs

All structs and enums can be included using:

#include "CanvasHelpers/ReplicatedCanvasData.h"

  • PenDataFadeType (Enum)
    • No FadeNo fade will be made.
    • LinearA consistent fade of 1 to 0 will be made.
    • CurveA fade determined by a curve is made.
  • CanvasPenData (Struct)
    • Brush (Not Used)
    • StepSize(Not Used)
    • Tint (Linear Color)Tint of the line.
    • Size (float)Size of the line.
    • OpacityFadeType (PenDataFadeType)Determines how the opacity fades if the board supports fading.
    • OpacityFadeCurve (Curve Float)A curve that makes the line opacity decrease if the board fades lines. The resulting value will be an absolute value of -1 to 1.
    • SizeFadeType (PenDataFadeType)Determines how the line shrinks if the board supports fading.
    • SizeFadeCurve (Curve Float)A curve that makes the line size decrease if the board fades lines. The resulting value will be an absolute value.
  • CanvasLineData (Struct)
    • DrawingPlayer (Name)Player that drew the line.
    • BoardID (integer)The unique id used to identify boards of the same player.
    • DrawnTime (float)The game time at which the line was drawn.
    • StartingPoint (Vector 2D)The starting point of the line.
    • StartingDirection (Vector 2D)The starting direction the cursor was going when the line was started.
    • StoppingPoint (Vector 2D)Stopping Point of the line.
    • StoppingDirection (Vector 2D)The stopping direction the cursor was going when the line was started.
    • PenData (CanvasPenData)Pen data that is used for drawing the line.
Clone this wiki locally