Reading: 

Plugin: Utility

Next:  About this plugin
Introduction

The Utility plugin shares common utilities between Ferrefy plugins. It can be used as a thin layer of additions to very commonly used engine code (math / input / widgets / logging / data) and to improve blueprint access to engine methods.

The Utility Plugin is intended to be as small as possible, to efficiently provide methods actively used in Ferrefy plugins as a single plugin.

Benefits
  • Packs common methods used by Ferrefy plugins into a single plugin.
  • Adds a thin layer of additions to common engine code (math / input / widgets / logging / data) which also improves blueprint access to engine methods.
Requirements

You can get this plugin here:

  • Utility

    Coming soon!

This plugin does not depend on other plugins.

Installation

First follow the docs on how to install a plugin in general.

This plugin does not require any setup.

Next:  Usage
Debug Utils

UDebugUtils provides a compact logging method for c++ and blueprints which displays more information than the default ways of logging. For example, in c++ CUR_LOG automatically adds the class, function and line number of the log method when called:

CUR_LOG(LogYourPlugin, Warning, "This is the value: (%f)", YourFloatValue);

Calling that function could log the following example:

LogYourPlugin: Warning: FYourClass::ItsMethod (12): This is the value (0.6).

In blueprints a (Debug Utils) log method of desired verbosity level can be called. This node has a compact mode, but can also provide extra information. Blueprints do not have line numbers.

General Project Setting Utils

The General Project Setting Utils makes it possible to retrieve the following general project settings from blueprints:

  • Company Name
  • Company Distinguished Name
  • Copyright Notice
  • Homepage
  • Licensing Terms
  • Privacy Policy
  • Project Name
  • Project Version
  • Support Contact
Intersection Utils

UIntersectionUtils provides 2 blueprint accessible methods used to test if a given point in space is inside a shape (plane or box) or not. If it is not, a line between the center of the shape and the given point intersects with the edge of the shape. It then gives you the position of that intersection point.

Sorting Utils

USortingUtils is a minimal blueprint function library which provides bubble sorting functions of int, float and datetime (BubbleSort). This is intended to be used in blueprints.

The input array is passed as reference and sorted. The return value is an array of original indexes at their new indexes. These indexes can be helpful in some situations: 1. to program a UI animation to move widget X from position at old index 2 to position at new index 15. 2. To get data from other arrays by reusing the current sort result.

Blueprint Macro Library 'Container'

The Blueprint Macro Library 'Container' provides a few utilities used to speed up writing blueprint logic for arrays, sets and maps.

In a single blueprint node you can test if a container is empty, get a previous or next element, or filter elements by class.