• Features:
  • Spacing widgets from each other to prevent them from overlapping (main feature of the plug-in) 
  • Force widgets to remain within the bounds of a rectangle (Overlay) – can be disabled
  • 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:

  •  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

Documentation: https://nuage.liiib.re/s/N5X5TF75yZbNCjM

Example Project: https://nuage.liiib.re/s/ieptF5Fnwkbc4sM (does not include binaries so you will need to recompile it by yourself. Example project with binaries available on demand for those who work in editor only)

  • 特征:
  • 相互间隔小部件以防止它们重叠(插件的主要功能) 
  • 强制小部件保持在矩形的边界内(叠加)-可以禁用
  • 在游戏中自动将2D小部件放置在3D actor上(绑定Actor模式)
  • 蓝图事件以根据绑定的actor是否在视线范围内以及他从玩家摄像机焦点的方向(绑定Actor模式)来更改控件外观

代码模块:

  •  WidgetSpacer(运行时)

蓝图数目: 0

C++类数: 6

网络复制: 非也。

支持的开发平台: Windows32位,Windows64位,Linux,MacOS,iOS,Android

支持的目标构建平台: Android,Gear VR,HoloLens2,HTML5,iOS,Linux,MacOS,Nintendo Switch,Oculus,PlayStation4,Steam VR,Windows32位,Windows64位,Xbox One

文件: https://nuage.liiib.re/s/N5X5TF75yZbNCjM

示例项目: https://nuage.liiib.re/s/ieptF5Fnwkbc4sM (不包括二进制文件,所以你需要自己重新编译它。 示例项目,二进制文件可供那些只在编辑器中工作的人按需使用)






The Widget Spacer plugin, built entirely in C++, allows you to automatically space any widgets placed on an overlay in your UI and prevents overlap. It is instrumental in situations with many actors like enemies, players, and items, which normally cause the text widgets to overlap and need to be completely legible or clickable. It also includes features allowing it to automatically place these widgets over the 3D position of an actor on screen and on the screen’s border with an arrow pointing to its direction when the actor is off-screen.

It’s built with efficiency and optimization in mind for situations where even 50+ widgets can exist simultaneously on the screen without much FPS loss.

Typical example of usage:

  • RPG games where you want to display 2D messages or icons over NPCs (Bound-Actor mode)
  • Top-down games with lots of loot (items) and enemies
  • Complex UIs systems where you need to move over some widgets (Manual mode)
  • Flight games and simulators where you need to locate objects off-screen
  • Strategy games where you need 2D display over your and other player 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++ classes that are usable and blueprintable in your own project :

  • SpacerOverlay: Inherits from Overlay widget. This is the main component of the plug-in, it defines the zone within which the spaceable widgets will be placed. It hosts all the computations. It has two modes:

+ Manual : Widgets can be freely placed by the developper (with SetIdealPosition method) and will be spaced from each other when calling SpaceWidgets method.

+ ActorBound : Allows to automatically place the 2D widgets over actors in the 3D game and space them.

  • SpaceableWidgetInterface: Interface to be implemented by all individual widgets to be added in the spacer overlay that should be spaced from each other.
  • SpaceableWidgetBase: Parent class implementing SpaceableWidgetInterface than you can inherit to simply use the Manual mode.
  • BoundActorWidgetBase: Parent class implementing SpaceableWidgetInterface than you can inherit to simply use the BoundActor mode.
  • SpacerHelper: Class not made to be instanced, containing a bunch of helpful static methods.
  • WidgetSpacer: Plug-in definition class. Not to be used.

Overview video : https://youtu.be/0QQcKhEEyqU

小部件间隔插件,完全建立在C++,允许您自动空间放置在您的UI复盖的任何小部件,并防止重叠。 它在有许多actor(如敌人、玩家和项目)的情况下很有用,这些actor通常会导致文本小部件重叠,并且需要完全清晰或可点击。 它还包括一些功能,使其能够自动将这些小部件放置在actor在屏幕上的3D位置和屏幕边框上,并在actor离开屏幕时使用指向其方向的箭头。

它是建立在效率和优化考虑的情况下,即使50+小部件可以同时存在在屏幕上没有太多的FPS损失。

典型用法示例:

  • 想要在Npc上显示2D消息或图标的RPG游戏(绑定-Actor模式)
  • 自上而下的游戏,有很多战利品(物品)和敌人
  • 复杂的Ui系统,您需要移动一些小部件(手动模式)
  • 飞行游戏和模拟器,您需要在屏幕外定位物体
  • 战略游戏,你需要2D显示在你和其他玩家单位(绑定演员模式)
  • 需要在游戏元素上显示2D UI的体育游戏
  • 在屏幕边框上显示小部件以指示不在视线范围内的actor的方向(绑定-Actor模式)
  • 等。

插件对象:

该插件定义了在您自己的项目中可用和可蓝图的以下C++类 :

  • 太空飞船:继承自Overlay widget。 这是插件的主要组件,它定义了空间小部件将放置在其中的区域。 它承载所有的计算。 它有两种模式:

+ 手册 :Widgets可以由developper自由放置(使用SetIdealPosition方法),并且在调用SpaceWidgets方法时将彼此间隔开。

+ ActorBound :允许自动将2D小部件放置在3d游戏中的actor上并将其放置空间。

  • 空间带宽接口: 接口将由所有单独的小部件实现,以添加在间隔复盖应该彼此间隔。
  • 空间,空间: 父类实现SpaceableWidgetInterface比你可以继承简单地使用手动模式。
  • BoundActorWidgetBase: 父类实现SpaceableWidgetInterface比你可以继承简单地使用BoundActor模式。
  • 太空助理: 类没有被实例化,包含一堆有用的静态方法。
  • [医]小刀: 插件定义类。 不被使用。

概览短片 : https://youtu.be/0QQcKhEEyqU

声明:本站所有资源都是由站长从网络上收集而来,如若本站内容侵犯了原著者的合法权益,可联系站长删除。