// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved. namespace FlaxEditor.Utilities; /// /// Units display utilities for Editor. /// public static class Units { /// /// Factor of units per meter. /// public static readonly float Meters2Units = 100f; /// /// False to always show game units without any postfix. /// public static bool UseUnitsFormatting = true; /// /// Add a space between numbers and units for readability. /// public static bool SeparateValueAndUnit = true; /// /// If set to true, the distance unit is chosen on the magnitude, otherwise it's meters. /// public static bool AutomaticUnitsFormatting = true; /// /// Return the unit according to user settings. /// /// The unit name. /// The formatted text. public static string Unit(string unit) { if (SeparateValueAndUnit) return $" {unit}"; return unit; } }