TemperatureUnits
TemperatureUnits
#Overview
name: TemperatureUnits
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 TemperatureUnits is to specify the unit of measurement for temperature values within the Unreal Engine editor. It is used to control how temperature-related data is displayed and interpreted in the editor interface.
This setting variable is primarily used by the Unreal Editor subsystem, specifically within the Editor Project Settings module. It’s part of the UEditorProjectAppearanceSettings class, which handles various appearance-related configurations for the editor.
The value of this variable is set through the Editor Project Settings interface in the Unreal Engine editor. It can be modified by users to match their preferred temperature unit.
TemperatureUnits interacts with other unit-related variables in the UEditorProjectAppearanceSettings class, such as AccelerationUnits, ForceUnits, and TorqueUnits. These variables collectively define the unit system used throughout the editor.
Developers should be aware that changing this variable will affect how temperature values are displayed across the entire editor interface. It’s important to ensure that all team members are using the same temperature unit setting to avoid confusion or errors in temperature-related calculations or asset creation.
Best practices when using this variable include:
- Standardizing the temperature unit across the entire project team to maintain consistency.
- Documenting the chosen temperature unit in project guidelines to ensure all team members are aware of the setting.
- Considering the target audience or market when choosing the temperature unit, as different regions may prefer different units (e.g., Celsius vs. Fahrenheit).
- Being cautious when changing this setting mid-project, as it may affect existing assets or calculations that rely on a specific temperature unit.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditor.ini:532, section: [/Script/UnrealEd.EditorProjectAppearanceSettings]
- INI Section:
/Script/UnrealEd.EditorProjectAppearanceSettings
- Raw value:
EUnit::Celsius
- 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:113
Scope: file
Source code excerpt:
Settings.SetDisplayUnits(EUnitType::Acceleration, AccelerationUnits);
}
else if (Name == GET_MEMBER_NAME_CHECKED(UEditorProjectAppearanceSettings, TemperatureUnits))
{
Settings.SetDisplayUnits(EUnitType::Temperature, TemperatureUnits);
}
else if (Name == GET_MEMBER_NAME_CHECKED(UEditorProjectAppearanceSettings, ForceUnits))
{
Settings.SetDisplayUnits(EUnitType::Force, ForceUnits);
}
else if (Name == GET_MEMBER_NAME_CHECKED(UEditorProjectAppearanceSettings, TorqueUnits))
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Settings/EditorProjectSettings.cpp:180
Scope (from outer to inner):
file
function void UEditorProjectAppearanceSettings::PostInitProperties
Source code excerpt:
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:96
Scope (from outer to inner):
file
class class UEditorProjectAppearanceSettings : public UDeveloperSettings
Source code excerpt:
UPROPERTY(EditAnywhere, config, Category=Units, AdvancedDisplay, meta=(DisplayName="Temperature", Tooltip="Choose the units in which to display temperatures.", ValidEnumValues="Celsius, Farenheit, Kelvin"))
EUnit TemperatureUnits;
UPROPERTY(EditAnywhere, config, Category=Units, AdvancedDisplay, meta=(DisplayName="Force", Tooltip="Choose the units in which to display forces.", ValidEnumValues="Newtons, PoundsForce, KilogramsForce, KilogramCentimetersPerSecondSquared"))
EUnit ForceUnits;
UPROPERTY(EditAnywhere, config, Category = Units, AdvancedDisplay, meta = (DisplayName = "Torque", Tooltip = "Choose the units in which to display torques.", ValidEnumValues = "NewtonMeters, KilogramCentimetersSquaredPerSecondSquared"))
EUnit TorqueUnits;