AngleUnits
AngleUnits
#Overview
name: AngleUnits
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 AngleUnits is to specify the units in which angles are displayed in the Unreal Engine editor. It is part of the editor’s project appearance settings, which control how various measurements and values are presented to the user in the Unreal Engine development environment.
This setting variable is primarily used by the UnrealEd module, specifically within the EditorProjectSettings system. It’s part of the UEditorProjectAppearanceSettings class, which is derived 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 changes are handled by the PostEditChangeProperty function.
AngleUnits interacts with other unit-related variables in the UEditorProjectAppearanceSettings class, such as MassUnits, TimeUnits, SpeedUnits, and others. These variables collectively define the display units for various physical quantities in the editor.
Developers should be aware that:
- Changes to this variable will affect how angles are displayed throughout the editor.
- The valid values for this variable are limited to Degrees and Radians, as indicated by the ValidEnumValues metadata.
- This setting is part of the editor configuration and does not directly affect runtime behavior of the game.
Best practices when using this variable include:
- Choosing the unit that is most appropriate for your project and team’s workflow.
- Ensuring consistency with other unit choices in your project to avoid confusion.
- Documenting the chosen unit system for your project to maintain consistency across the development team.
- Being aware that changing this setting may affect how values are interpreted by team members, so communication about any changes is important.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditor.ini:528, section: [/Script/UnrealEd.EditorProjectAppearanceSettings]
- INI Section:
/Script/UnrealEd.EditorProjectAppearanceSettings
- Raw value:
EUnit::Degrees
- 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:97
Scope (from outer to inner):
file
function void UEditorProjectAppearanceSettings::PostEditChangeProperty
Source code excerpt:
Settings.SetDisplayUnits(EUnitType::Time, TimeUnits);
}
else if (Name == GET_MEMBER_NAME_CHECKED(UEditorProjectAppearanceSettings, AngleUnits))
{
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))
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Settings/EditorProjectSettings.cpp:178
Scope (from outer to inner):
file
function void UEditorProjectAppearanceSettings::PostInitProperties
Source code excerpt:
Settings.SetDisplayUnits(EUnitType::Mass, MassUnits);
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:84
Scope (from outer to inner):
file
class class UEditorProjectAppearanceSettings : public UDeveloperSettings
Source code excerpt:
UPROPERTY(EditAnywhere, config, Category=Units, AdvancedDisplay, meta=(DisplayName="Angles", Tooltip="Choose the units in which to display angles.", ValidEnumValues="Degrees, Radians"))
EUnit AngleUnits;
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;