December Free Content now available!

Widget Spacer

GB Studio - Code Plugins - Oct 7, 2022

Display widgets over actors in game, maintain them on screen and preventing them for overlapping. Overview video :

  • Supported Platforms
  • Supported Engine Versions
    4.27, 5.0 - 5.1
  • Download Type
    Engine Plugin
    This product contains a code plugin, complete with pre-built binaries and all its source code that integrates with Unreal Engine, which can be installed to an engine version of your choice then enabled on a per-project basis.

WidgetSpacer is a code plug-in that will allow you to automatically space any widgets placed on an overlay in your UI. It also has features allowing them to automatically place these widgets over the 3D position of an actor on screen, and on the border of the screen with an arrow pointing to its direction when the actor is out of the screen.

Typical example of usage:

  • Complex UIs systems where you need to move over some widgets (manual mode)
  • RPG game where you want to display 2D messages or icons over NPCs (bound-actor mode)
  • Strategy game where you need some 2D display over your units (bound-actor mode)
  • Sports game where you need to display 2D UI over game elements
  • Displaying widgets on the border of the screen to indicate the direction of an actor that is out of sight (bound-actor mode)
  • etc.
  • Plug-in objects
  • The plug-in defines the following C++ class

Overview video :

Technical Details


  • Ensuring widgets remain within the bounds of a rectangle (overlay)
  • Spacing widgets from each other to prevent them from overlapping (main feature of the plug-in) 
  • Automatically placing 2D widgets over a 3D actor in game (Bound Actor mode)
  • Blueprints events to change widget appearance depending on whether the bound actor is within sight and on which direction he is from player's camera focus (Bound Actor mode)

Code Modules: (Please include a full list of each Plugin module and their module type (Runtime, Editor etc.))

  •  WidgetSpacer (Runtime)

Number of Blueprints: 0

Number of C++ Classes: 6

Network Replicated: No

Supported Development Platforms: Windows 32-bit, Windows 64-bit, Linux, MacOS, iOS, Android

Supported Target Build Platforms: Android, Gear VR, HoloLens 2, HTML5, iOS, Linux, MacOS, Nintendo Switch, Oculus, PlayStation 4, Steam VR, Windows 32-bit, Windows 64-bit, Xbox One


Example Project: