![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <UnitConversion.h>
Static Public Member Functions | |
| static CORE_API FUnitSettings & | Settings () |
| static CORE_API bool | AreUnitsCompatible (EUnit From, EUnit To) |
| static CORE_API bool | IsUnitOfType (EUnit Unit, EUnitType Type) |
| static CORE_API EUnitType | GetUnitType (EUnit) |
| static CORE_API const TCHAR * | GetUnitDisplayString (EUnit Unit) |
| static CORE_API TOptional< EUnit > | UnitFromString (const TCHAR *UnitString) |
| static CORE_API TConstArrayView< const TCHAR * > | GetSupportedUnits () |
| template<typename T > | |
| static T | Convert (T InValue, EUnit From, EUnit To) |
| template<typename T > | |
| static FNumericUnit< T > | QuantizeUnitsToBestFit (T Value, EUnit Units) |
| template<typename T > | |
| static EUnit | CalculateDisplayUnit (T Value, EUnit InUnits) |
Check whether it is possible to convert a number between the two specified units
Quantizes this number to the most appropriate unit for user friendly presentation (e.g. 1000m returns 1km), adhereing to global display settings.
Convert the specified number from one unit to another. Does nothing if the units are incompatible.
|
static |
Helper function to get all supported units
Get the display string for the the specified unit type
Get the unit abbreviation the specified unit type
Check whether a unit is of the specified type
|
static |
Quantizes this number to the most appropriate unit for user friendly presentation (e.g. 1000m returns 1km).
|
static |
Get the global settings for unit conversion/display
Helper function to find a unit from a string (name or display string)
Helper function to find a unit from a string (name or abbreviation)