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
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
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.