Common usage patterns and example code for Universal Floating Widget.

Shipped example content

The plugin includes example Blueprints and a demo map. Open FloatingWidgetExample (Content/Map) to see them in action.

  • UniversalFloatingWidget — Base FloatingPanelWidget (create your Blueprints from this)
  • W_FloatingPanelExample, W_FloatingPanelExample_2 — Example panels
  • W_HUD — Main HUD with floating panel instances
  • W_LayoutSlotEntryWidget — Slot entry for FloatingLayoutSlotListView

Layout save/load (Blueprint)

Get the subsystem from your HUD or Player Controller (context must have LocalPlayer). Use "Get Local Player Subsystem" with type FloatingWidgetLayoutSubsystem. Use Save Layout and Load Layout for layout persistence.


// Save current arrangement
Subsystem->SaveLayout(FName("Default"));

// Load a layout
Subsystem->LoadLayout(FName("Default"));

// List saved layouts (for a dropdown)
TArray<FName> Names = Subsystem->GetSavedLayoutNames();

// Reset to designer positions (no saved layout needed)
Subsystem->ResetToDesignerDefault();

// End all active drags (e.g. when opening a modal)
Subsystem->EndAllActiveDrags();
              

Layout save/load (C++)


// From Blueprint or C++ — use LocalPlayer context
UFloatingWidgetLayoutSubsystem* Sub = LocalPlayer->GetSubsystem<UFloatingWidgetLayoutSubsystem>();
Sub->SaveLayout(FName("Default"));
Sub->LoadLayout(FName("Default"));
Sub->ResetToDesignerDefault();
TArray<FName> Names = Sub->GetSavedLayoutNames();
Sub->DeleteLayout(FName("OldLayout"));
Sub->SetLastUsedLayout(FName("Default"));