SpeedUnits
SpeedUnits
#Overview
name: SpeedUnits
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of SpeedUnits is to define the units in which speeds and velocities are displayed in the Unreal Engine editor. This setting variable is part of the editor’s project appearance settings, which affect how various measurements and values are presented to developers within the Unreal Engine development environment.
SpeedUnits is primarily used in the UnrealEd module, specifically within the editor’s project settings system. It’s a part of the UEditorProjectAppearanceSettings class, which inherits from UDeveloperSettings.
The value of this variable is set through the Unreal Engine editor’s project settings interface. It can be modified by users in the editor, and its value is stored in the project’s configuration files.
SpeedUnits interacts with other unit-related variables in the UEditorProjectAppearanceSettings class, such as AngleUnits, AngularSpeedUnits, and AccelerationUnits. These variables collectively define how different types of measurements are displayed in the editor.
Developers should be aware that changing this variable will affect how speed and velocity values are displayed throughout the editor. It’s important to choose a unit that is most appropriate for the scale and context of the project to ensure clarity and avoid confusion.
Best practices when using this variable include:
- Choosing a unit that is most relevant to the project’s scale and domain (e.g., using kilometers per hour for a racing game, or meters per second for a physics simulation).
- Ensuring consistency with other unit choices in the project to avoid confusion.
- Documenting the chosen units clearly for all team members to reference.
- Being mindful of how this setting might affect any custom tools or plugins that rely on speed measurements.
- Considering the target audience and their familiarity with different unit systems when selecting the appropriate speed units.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditor.ini:529, section: [/Script/UnrealEd.EditorProjectAppearanceSettings]
- INI Section:
/Script/UnrealEd.EditorProjectAppearanceSettings
- Raw value:
EUnit::MetersPerSecond
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Settings/EditorProjectSettings.cpp:101
Scope (from outer to inner):
file
function void UEditorProjectAppearanceSettings::PostEditChangeProperty
Source code excerpt:
Settings.SetDisplayUnits(EUnitType::Angle, AngleUnits);
}
else if (Name == GET_MEMBER_NAME_CHECKED(UEditorProjectAppearanceSettings, SpeedUnits))
{
Settings.SetDisplayUnits(EUnitType::Speed, SpeedUnits);
}
else if (Name == GET_MEMBER_NAME_CHECKED(UEditorProjectAppearanceSettings, AngularSpeedUnits))
{
Settings.SetDisplayUnits(EUnitType::AngularSpeed, AngularSpeedUnits);
}
else if (Name == GET_MEMBER_NAME_CHECKED(UEditorProjectAppearanceSettings, AccelerationUnits))
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Settings/EditorProjectSettings.cpp:179
Scope (from outer to inner):
file
function void UEditorProjectAppearanceSettings::PostInitProperties
Source code excerpt:
Settings.SetDisplayUnits(EUnitType::Time, TimeUnits);
Settings.SetDisplayUnits(EUnitType::Angle, AngleUnits);
Settings.SetDisplayUnits(EUnitType::Speed, SpeedUnits);
Settings.SetDisplayUnits(EUnitType::Temperature, TemperatureUnits);
Settings.SetDisplayUnits(EUnitType::Force, ForceUnits);
Settings.SetShouldDisplayUnits(bDisplayUnits);
}
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Public/Settings/EditorProjectSettings.h:87
Scope (from outer to inner):
file
class class UEditorProjectAppearanceSettings : public UDeveloperSettings
Source code excerpt:
UPROPERTY(EditAnywhere, config, Category=Units, AdvancedDisplay, meta=(DisplayName="Speed/Velocity", Tooltip="Choose the units in which to display speeds and velocities.", ValidEnumValues="CentimetersPerSecond, MetersPerSecond, KilometersPerHour, MilesPerHour"))
EUnit SpeedUnits;
UPROPERTY(EditAnywhere, config, Category=Units, AdvancedDisplay, meta=(DisplayName="Angular Speed", Tooltip="Choose the units in which to display angular speeds.", ValidEnumValues="DegreesPerSecond, RadiansPerSecond"))
EUnit AngularSpeedUnits;
UPROPERTY(EditAnywhere, config, Category=Units, AdvancedDisplay, meta=(DisplayName="Acceleration", Tooltip="Choose the units in which to display acceleration.", ValidEnumValues="CentimetersPerSecondSquared, MetersPerSecondSquared"))
EUnit AccelerationUnits;