p.PhysicalMaterial.ShowExperimentalProperties
p.PhysicalMaterial.ShowExperimentalProperties
#Overview
name: p.PhysicalMaterial.ShowExperimentalProperties
This variable is created as a Console Variable (cvar).
- type:
Var
- help: ``
It is referenced in 5
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of p.PhysicalMaterial.ShowExperimentalProperties is to control the visibility and accessibility of experimental properties in physical materials within Unreal Engine 5. This setting variable is primarily used in the physics system, specifically for managing physical material properties.
This setting variable is relied upon by the PhysicsCore module of Unreal Engine 5. It’s used within the PhysicalMaterial class and related systems.
The value of this variable is set through a console variable (CVar) system. It’s initialized as false and can be changed at runtime using the console command “p.PhysicalMaterial.ShowExperimentalProperties”.
The associated variable bShowExperimentalProperties directly interacts with p.PhysicalMaterial.ShowExperimentalProperties. They share the same value, with bShowExperimentalProperties serving as the internal representation within the engine code.
Developers must be aware that this variable controls access to experimental features in physical materials. When set to true, it exposes properties that are still in development and may change in future updates. These properties are marked as experimental and come with a warning about potential risks.
Best practices when using this variable include:
- Only enabling it in development or testing environments, not in production builds.
- Being cautious when using the exposed experimental properties, as they may not be fully tested or optimized.
- Keeping track of any changes made using these experimental properties, as they might need to be adjusted or removed in future engine updates.
Regarding the associated variable bShowExperimentalProperties:
The purpose of bShowExperimentalProperties is to serve as an internal flag within the UPhysicalMaterial class to determine whether experimental properties should be visible and editable.
This variable is used within the PhysicsCore module, specifically in the PhysicalMaterial class.
Its value is set based on the console variable p.PhysicalMaterial.ShowExperimentalProperties, ensuring consistency between the console setting and the internal engine state.
bShowExperimentalProperties directly interacts with various UPROPERTY macros in the UPhysicalMaterial class, controlling the visibility and editability of experimental properties.
Developers should be aware that this variable is transient and visible in the property editor when true. It acts as a gatekeeper for accessing experimental physical material properties.
Best practices include using this variable as a read-only indicator of the experimental state within engine code, and relying on the console variable for actually changing the setting.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/PhysicsCore/Private/PhysicalMaterial.cpp:16
Scope (from outer to inner):
file
namespace PhysicalMaterialCVars
Source code excerpt:
bool bShowExperimentalProperties = false;
FAutoConsoleVariableRef CVarShowExperimentalProperties(TEXT("p.PhysicalMaterial.ShowExperimentalProperties"), bShowExperimentalProperties, TEXT(""));
}
UDEPRECATED_PhysicalMaterialPropertyBase::UDEPRECATED_PhysicalMaterialPropertyBase(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
}
#Loc: <Workspace>/Engine/Source/Runtime/PhysicsCore/Public/PhysicalMaterials/PhysicalMaterial.h:190
Scope: file
Source code excerpt:
//
/** Experimental material properties are enabled via the p.PhysicalMaterial.ShowExperimentalProperties console variable.
NOTE: These are _experimental_ properties which may change. Use at your own risk! */
UPROPERTY(VisibleAnywhere, Transient, Category = "Experimental")
bool bShowExperimentalProperties = PhysicalMaterialCVars::bShowExperimentalProperties;
/** For enable soft collision shell thickness mode */
UPROPERTY(EditAnywhere, Category = "Experimental|Softness", meta = (EditCondition = "bShowExperimentalProperties"))
EPhysicalMaterialSoftCollisionMode SoftCollisionMode;
#Associated Variable and Callsites
This variable is associated with another variable named bShowExperimentalProperties
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/PhysicsCore/Private/PhysicalMaterial.cpp:14
Scope (from outer to inner):
file
namespace PhysicalMaterialCVars
Source code excerpt:
namespace PhysicalMaterialCVars
{
bool bShowExperimentalProperties = false;
FAutoConsoleVariableRef CVarShowExperimentalProperties(TEXT("p.PhysicalMaterial.ShowExperimentalProperties"), bShowExperimentalProperties, TEXT(""));
}
UDEPRECATED_PhysicalMaterialPropertyBase::UDEPRECATED_PhysicalMaterialPropertyBase(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
}
#Loc: <Workspace>/Engine/Source/Runtime/PhysicsCore/Public/PhysicalMaterials/PhysicalMaterial.h:21
Scope (from outer to inner):
file
namespace PhysicalMaterialCVars
Source code excerpt:
namespace PhysicalMaterialCVars
{
extern bool bShowExperimentalProperties;
}
/**
* Defines the directional strengths of a physical material in term of force per surface area
*/
#Loc: <Workspace>/Engine/Source/Runtime/PhysicsCore/Public/PhysicalMaterials/PhysicalMaterial.h:193
Scope (from outer to inner):
file
class class UPhysicalMaterial : public UObject
Source code excerpt:
NOTE: These are _experimental_ properties which may change. Use at your own risk! */
UPROPERTY(VisibleAnywhere, Transient, Category = "Experimental")
bool bShowExperimentalProperties = PhysicalMaterialCVars::bShowExperimentalProperties;
/** For enable soft collision shell thickness mode */
UPROPERTY(EditAnywhere, Category = "Experimental|Softness", meta = (EditCondition = "bShowExperimentalProperties"))
EPhysicalMaterialSoftCollisionMode SoftCollisionMode;
/** Thickness of the layer just inside the collision shape in which contact is considered "soft".