UIBrightness
UIBrightness
#Overview
name: UIBrightness
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 UIBrightness is to adjust the brightness of UI panels in the VR Editor mode of Unreal Engine 5. This setting variable is primarily used for customizing the visual appearance of the user interface in a virtual reality editing environment.
The UIBrightness setting variable is primarily relied upon by the VR Editor subsystem within Unreal Engine 5. Specifically, it is used in the VREditor module, as evidenced by its usage in the VREditorFloatingUI and VREditorRadialFloatingUI classes.
The value of this variable is set in the UVRModeSettings class, which is likely configurable through the editor’s settings interface. It is defined as an UPROPERTY with the EditAnywhere and config specifiers, indicating that it can be modified by users and persisted in configuration files.
The UIBrightness variable interacts with the FadeAlpha variable in both VREditorFloatingUI and VREditorRadialFloatingUI classes. The final brightness is calculated by multiplying UIBrightness with FadeAlpha, which suggests that the UI elements can be faded in and out while respecting the overall brightness setting.
Developers should be aware that this variable affects the visual appearance of UI elements in VR mode. Changes to this value will impact the readability and visibility of UI panels, which can be crucial for user experience in a VR environment.
Best practices when using this variable include:
- Ensuring the value is set to a level that provides good visibility without causing eye strain in VR.
- Testing the UI brightness across different VR environments and lighting conditions to find an optimal default value.
- Considering providing in-editor controls for users to adjust this value in real-time, as VR experiences can vary greatly between users and hardware setups.
- Being mindful of the interaction between UIBrightness and FadeAlpha when implementing UI fade effects.
- Respecting the ClampMin and UIMax metadata to prevent extreme values that could negatively impact the user experience.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorSettings.ini:60, section: [/Script/VREditor.VRModeSettings]
- INI Section:
/Script/VREditor.VRModeSettings
- Raw value:
1.500000
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/VREditor/Private/UI/VREditorFloatingUI.cpp:316
Scope (from outer to inner):
file
function void AVREditorFloatingUI::UpdateFadingState
Source code excerpt:
// Set material color
const float UIBrightness = FadeAlpha * GetDefault<UVRModeSettings>()->UIBrightness;
WidgetComponent->SetTintColorAndOpacity(FLinearColor(UIBrightness, UIBrightness, UIBrightness).CopyWithNewOpacity(FadeAlpha));
}
}
FVector AVREditorFloatingUI::CalculateAnimatedScale() const
{
#Loc: <Workspace>/Engine/Source/Editor/VREditor/Private/UI/VREditorRadialFloatingUI.cpp:335
Scope (from outer to inner):
file
function void AVREditorRadialFloatingUI::UpdateFadingState
Source code excerpt:
// Set material color
const float UIBrightness = FadeAlpha * GetDefault<UVRModeSettings>()->UIBrightness;;
for (UVREditorWidgetComponent* WidgetComponent : WidgetComponents)
{
WidgetComponent->SetTintColorAndOpacity(FLinearColor(UIBrightness, UIBrightness, UIBrightness).CopyWithNewOpacity(FadeAlpha));
}
}
}
FVector AVREditorRadialFloatingUI::CalculateAnimatedScale() const
#Loc: <Workspace>/Engine/Source/Editor/VREditor/Public/VRModeSettings.h:63
Scope (from outer to inner):
file
class class UVRModeSettings : public UVISettings
Source code excerpt:
/** Adjusts the brightness of the UI panels */
UPROPERTY(EditAnywhere, config, Category = "UI Customization", meta = (DisplayName = "UI Panel Brightness", ClampMin = 0.01, UIMax = 10.0))
float UIBrightness;
/** The size of the transform gizmo */
UPROPERTY(EditAnywhere, config, Category = "UI Customization", meta = (ClampMin = 0.1, ClampMax = 2.0))
float GizmoScale;
/** The maximum time in seconds between two clicks for a double-click to register */