bShowFloor
bShowFloor
#Overview
name: bShowFloor
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 15
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bShowFloor is to control the visibility of the floor or grid in various preview and editing environments within Unreal Engine 5. This setting is primarily used in the rendering system, specifically for preview scenes and viewport displays.
The bShowFloor variable is utilized by several Unreal Engine subsystems and modules, including:
- CustomizableObjectEditor
- DisplayClusterConfigurator
- AdvancedPreviewScene
- Cascade (Particle System Editor)
- Blueprint Editor (SCS Editor)
The value of this variable is typically set in the following ways:
- Through editor settings (e.g., UDisplayClusterConfiguratorEditorSettings, UEditorPerProjectUserSettings)
- In preview scene profiles (FPreviewSceneProfile)
- Directly in the viewport client code
This variable often interacts with other related variables such as:
- bShowEnvironment (for environment visibility)
- bShowGrid (for grid visibility in some contexts)
- FloorMeshComponent (the actual component representing the floor)
Developers should be aware of the following when using this variable:
- It affects the visibility of the floor/grid in preview scenes and editors.
- Changes to this variable may require updating related components or refreshing the viewport.
- It may be part of a larger profile or settings structure.
Best practices when using this variable include:
- Ensure that changes to the variable are reflected in the UI and saved to the appropriate configuration.
- Consider the impact on performance and visual clarity when toggling floor visibility.
- Coordinate changes with related settings (e.g., environment visibility) for a consistent user experience.
- Use the appropriate method to change the value (e.g., through settings objects or direct component manipulation) based on the context.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:543, section: [/Script/UnrealEd.PersonaOptions]
- INI Section:
/Script/UnrealEd.PersonaOptions
- Raw value:
True
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Experimental/Mutable/Source/CustomizableObjectEditor/Private/MuCOE/CustomizableObjectEditorLevelProfile.cpp:155
Scope (from outer to inner):
file
function bool LevelProfileManage::FillPreviewSceneProfile
Source code excerpt:
PreviewSceneProfile.bSharedProfile = false;
PreviewSceneProfile.bShowFloor = true;
PreviewSceneProfile.bShowEnvironment = true;
PreviewSceneProfile.bRotateLightingRig = false;
PreviewSceneProfile.DirectionalLightIntensity = DirectionalLight->GetBrightness();
PreviewSceneProfile.DirectionalLightColor = DirectionalLight->GetLightColor();
PreviewSceneProfile.SkyLightIntensity = SkyLight ? SkyLight->GetLightComponent()->Intensity : 0.0f;
PreviewSceneProfile.LightingRigRotation = 0.0f;
#Loc: <Workspace>/Engine/Plugins/Experimental/Mutable/Source/CustomizableObjectEditor/Private/MuCOE/CustomizableObjectEditorViewportClient.cpp:900
Scope (from outer to inner):
file
function void FCustomizableObjectEditorViewportClient::UpdateShowGrid
Source code excerpt:
if (Settings->Profiles.IsValidIndex(ProfileIndex))
{
bool bOldShowGridValue = Settings->Profiles[ProfileIndex].bShowFloor;
if (bKeepOldValue)
{
// Do not toggle the value when the viewport is being constructed
bNewShowGridValue = bOldShowGridValue;
}
#Loc: <Workspace>/Engine/Plugins/Experimental/Mutable/Source/CustomizableObjectEditor/Private/MuCOE/CustomizableObjectEditorViewportClient.cpp:913
Scope (from outer to inner):
file
function void FCustomizableObjectEditorViewportClient::UpdateShowGrid
Source code excerpt:
}
Settings->Profiles[ProfileIndex].bShowFloor = bNewShowGridValue;
}
DrawHelper.bDrawGrid = bNewShowGridValue;
FAdvancedPreviewScene* AdvancedScene = static_cast<FAdvancedPreviewScene*>(PreviewScene);
if (AdvancedScene != nullptr)
#Loc: <Workspace>/Engine/Plugins/Experimental/Mutable/Source/CustomizableObjectEditor/Private/MuCOE/CustomizableObjectEditorViewportClient.cpp:1792
Scope (from outer to inner):
file
function void FCustomizableObjectEditorViewportClient::OnAssetViewerSettingsChanged
Source code excerpt:
}
else if (InPropertyName == GET_MEMBER_NAME_CHECKED(FPreviewSceneProfile, bShowFloor))
{
if (Settings->Profiles.IsValidIndex(ProfileIndex))
{
DrawHelper.bDrawGrid = Settings->Profiles[ProfileIndex].bShowFloor;
}
else
{
DrawHelper.bDrawGrid = !DrawHelper.bDrawGrid;
}
#Loc: <Workspace>/Engine/Plugins/Runtime/nDisplay/Source/DisplayClusterConfigurator/Private/Views/Viewport/DisplayClusterConfiguratorSCSEditorViewportClient.cpp:1035
Scope (from outer to inner):
file
function void FDisplayClusterConfiguratorSCSEditorViewportClient::ToggleShowFloor
Source code excerpt:
UDisplayClusterConfiguratorEditorSettings* Settings = GetMutableDefault<UDisplayClusterConfiguratorEditorSettings>();
bool bShowFloor = Settings->bEditorShowFloor;
bShowFloor = !bShowFloor;
EditorFloorComp->SetVisibility(bShowFloor);
EditorFloorComp->SetCollisionEnabled(bShowFloor ? ECollisionEnabled::QueryAndPhysics : ECollisionEnabled::NoCollision);
Settings->bEditorShowFloor = bShowFloor;
Settings->PostEditChange();
Settings->SaveConfig();
Invalidate();
}
#Loc: <Workspace>/Engine/Source/Editor/AdvancedPreviewScene/Private/AdvancedPreviewScene.cpp:189
Scope (from outer to inner):
file
function void FAdvancedPreviewScene::UpdateScene
Source code excerpt:
SkyComponent->SetVisibility(Profile.bShowEnvironment, true);
SkyLight->SetVisibility(Profile.bUseSkyLighting, true);
FloorMeshComponent->SetVisibility(Profile.bShowFloor, true);
bRotateLighting = Profile.bRotateLightingRig;
CurrentRotationSpeed = Profile.RotationSpeed;
}
FLinearColor FAdvancedPreviewScene::GetBackgroundColor() const
#Loc: <Workspace>/Engine/Source/Editor/AdvancedPreviewScene/Private/AdvancedPreviewScene.cpp:352
Scope (from outer to inner):
file
function void FAdvancedPreviewScene::SetFloorVisibility
Source code excerpt:
FProperty* FloorProperty = FindFProperty<FProperty>(FPreviewSceneProfile::StaticStruct(), PropertyName);
DefaultSettings->Profiles[CurrentProfileIndex].bShowFloor = bVisible;
FPropertyChangedEvent PropertyEvent(FloorProperty);
DefaultSettings->PostEditChangeProperty(PropertyEvent);
}
else
{
// Otherwise set visibility directly on the component
FloorMeshComponent->SetVisibility(bVisible ? DefaultSettings->Profiles[CurrentProfileIndex].bShowFloor : bVisible);
}
}
void FAdvancedPreviewScene::SetEnvironmentVisibility(const bool bVisible, const bool bDirect)
{
// If not direct set visibility in profile and refresh the scene
#Loc: <Workspace>/Engine/Source/Editor/AdvancedPreviewScene/Private/AdvancedPreviewScene.cpp:440
Scope (from outer to inner):
file
function void FAdvancedPreviewScene::HandleToggleFloor
Source code excerpt:
void FAdvancedPreviewScene::HandleToggleFloor()
{
SetFloorVisibility(!DefaultSettings->Profiles[CurrentProfileIndex].bShowFloor);
}
void FAdvancedPreviewScene::HandleTogglePostProcessing()
{
FPreviewSceneProfile& Profile = DefaultSettings->Profiles[CurrentProfileIndex];
Profile.bPostProcessingEnabled = !Profile.bPostProcessingEnabled;
#Loc: <Workspace>/Engine/Source/Editor/AdvancedPreviewScene/Public/AssetViewerSettings.h:24
Scope (from outer to inner):
file
function FPreviewSceneProfile
Source code excerpt:
bSharedProfile = false;
bUseSkyLighting = true;
bShowFloor = true;
bShowEnvironment = true;
bRotateLightingRig = false;
DirectionalLightIntensity = 1.0f;
DirectionalLightColor = FLinearColor::White;
SkyLightIntensity = 1.0f;
LightingRigRotation = 0.0f;
#Loc: <Workspace>/Engine/Source/Editor/AdvancedPreviewScene/Public/AssetViewerSettings.h:75
Scope: file
Source code excerpt:
/** Toggle visibility of the floor mesh */
UPROPERTY(EditAnywhere, config, Category = Environment)
bool bShowFloor;
/** The environment color, used if Show Environment is false. */
UPROPERTY(EditAnywhere, config, Category = Environment, meta=(EditCondition="!bShowEnvironment"))
FLinearColor EnvironmentColor;
/** The environment intensity (0.0 - 20.0), used if Show Environment is false. */
#Loc: <Workspace>/Engine/Source/Editor/Cascade/Private/Cascade.cpp:3754
Scope (from outer to inner):
file
function void FCascade::OnViewGeometry
Source code excerpt:
FloorComponent->SetVisibility(bIsVisible);
EditorOptions->bShowFloor = bIsVisible;
EditorOptions->SaveConfig();
PreviewScene.RemoveComponent(FloorComponent);
PreviewScene.AddComponent(FloorComponent, FTransform::Identity);
PreviewViewport->RefreshViewport();
#Loc: <Workspace>/Engine/Source/Editor/Cascade/Private/CascadePreviewViewportClient.cpp:130
Scope (from outer to inner):
file
function FCascadeEdPreviewViewportClient::FCascadeEdPreviewViewportClient
Source code excerpt:
EditorOptions->FloorScale3D = FVector(1.0f, 1.0f, 1.0f);
}
EditorOptions->bShowFloor = false;
}
UStaticMesh* Mesh = NULL;
FloorComponent = NULL;
if (ParticleSystem)
{
#Loc: <Workspace>/Engine/Source/Editor/Cascade/Private/CascadePreviewViewportClient.cpp:161
Scope (from outer to inner):
file
function FCascadeEdPreviewViewportClient::FCascadeEdPreviewViewportClient
Source code excerpt:
// Hide it for now...
FloorComponent->SetVisibility(EditorOptions->bShowFloor);
if (ParticleSystem)
{
FloorComponent->SetRelativeLocation_Direct(ParticleSystem->FloorPosition);
FloorComponent->SetRelativeRotation_Direct(ParticleSystem->FloorRotation);
FloorComponent->SetRelativeScale3D(ParticleSystem->FloorScale3D);
}
#Loc: <Workspace>/Engine/Source/Editor/Kismet/Private/SCSEditorViewportClient.cpp:1077
Scope (from outer to inner):
file
function void FSCSEditorViewportClient::ToggleShowFloor
Source code excerpt:
UEditorPerProjectUserSettings* Settings = GetMutableDefault<UEditorPerProjectUserSettings>();
bool bShowFloor = Settings->bSCSEditorShowFloor;
bShowFloor = !bShowFloor;
EditorFloorComp->SetVisibility(bShowFloor);
EditorFloorComp->SetCollisionEnabled(bShowFloor? ECollisionEnabled::QueryAndPhysics : ECollisionEnabled::NoCollision);
Settings->bSCSEditorShowFloor = bShowFloor;
Settings->PostEditChange();
Invalidate();
}
bool FSCSEditorViewportClient::GetShowGrid()
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Preferences/CascadeOptions.h:131
Scope (from outer to inner):
file
class class UCascadeOptions : public UObject
Source code excerpt:
UPROPERTY(EditAnywhere, config, Category=Options)
uint32 bShowFloor:1;
UPROPERTY(EditAnywhere, config, Category=Options)
FString FloorMesh;
UPROPERTY(EditAnywhere, config, Category=Options)
FVector FloorPosition;