p.GeometryCollectionAssetForceStripOnCook
p.GeometryCollectionAssetForceStripOnCook
#Overview
name: p.GeometryCollectionAssetForceStripOnCook
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Bypass the construction of simulation properties when all bodies are simply cached for playback.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of p.GeometryCollectionAssetForceStripOnCook is to control whether the construction of simulation properties for Geometry Collections should be bypassed when all bodies are simply cached for playback during the cooking process.
This setting variable is primarily used in the Geometry Collection Engine module, which is part of Unreal Engine’s experimental features for physics and destruction simulations.
The value of this variable is set through the console variable system in Unreal Engine. It’s initialized as false in the source code, but can be changed at runtime or through configuration files.
The associated variable GeometryCollectionAssetForceStripOnCook directly interacts with p.GeometryCollectionAssetForceStripOnCook. They share the same value, with the console variable p.GeometryCollectionAssetForceStripOnCook controlling the boolean GeometryCollectionAssetForceStripOnCook.
Developers must be aware that enabling this variable will bypass the construction of simulation properties for Geometry Collections during the cooking process. This can potentially reduce the size of cooked assets but may impact runtime performance or behavior if the simulation properties are needed.
Best practices when using this variable include:
- Only enable it if you’re certain that all bodies in your Geometry Collections are meant for playback only and don’t require dynamic simulation.
- Test thoroughly after enabling to ensure that the desired behavior is maintained in the cooked build.
- Consider the trade-off between asset size reduction and potential runtime limitations.
Regarding the associated variable GeometryCollectionAssetForceStripOnCook:
The purpose of GeometryCollectionAssetForceStripOnCook is to store the state controlled by the console variable p.GeometryCollectionAssetForceStripOnCook within the C++ code.
This variable is used in the Geometry Collection Engine module, specifically in the UGeometryCollection class constructor.
The value of this variable is set by the console variable system and is used to initialize the bStripOnCook property of UGeometryCollection objects.
It directly interacts with the console variable p.GeometryCollectionAssetForceStripOnCook, serving as the in-code representation of its state.
Developers should be aware that this variable affects the initialization of UGeometryCollection objects and can impact how they are processed during cooking.
Best practices include:
- Treat this variable as read-only within the code, allowing it to be controlled solely through the console variable system.
- Consider the implications on asset cooking and runtime behavior when this variable is true.
- Use this variable consistently throughout the Geometry Collection system to ensure uniform behavior.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/GeometryCollectionEngine/Private/GeometryCollection/GeometryCollectionObject.cpp:52
Scope: file
Source code excerpt:
bool GeometryCollectionAssetForceStripOnCook = false;
FAutoConsoleVariableRef CVarGeometryCollectionBypassPhysicsAttributes(
TEXT("p.GeometryCollectionAssetForceStripOnCook"),
GeometryCollectionAssetForceStripOnCook,
TEXT("Bypass the construction of simulation properties when all bodies are simply cached for playback."));
bool bGeometryCollectionEnableForcedConvexGenerationInSerialize = true;
FAutoConsoleVariableRef CVarGeometryCollectionEnableForcedConvexGenerationInSerialize(
TEXT("p.GeometryCollectionEnableForcedConvexGenerationInSerialize"),
#Associated Variable and Callsites
This variable is associated with another variable named GeometryCollectionAssetForceStripOnCook
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/GeometryCollectionEngine/Private/GeometryCollection/GeometryCollectionObject.cpp:50
Scope: file
Source code excerpt:
DEFINE_LOG_CATEGORY_STATIC(LogGeometryCollectionInternal, Log, All);
bool GeometryCollectionAssetForceStripOnCook = false;
FAutoConsoleVariableRef CVarGeometryCollectionBypassPhysicsAttributes(
TEXT("p.GeometryCollectionAssetForceStripOnCook"),
GeometryCollectionAssetForceStripOnCook,
TEXT("Bypass the construction of simulation properties when all bodies are simply cached for playback."));
bool bGeometryCollectionEnableForcedConvexGenerationInSerialize = true;
FAutoConsoleVariableRef CVarGeometryCollectionEnableForcedConvexGenerationInSerialize(
TEXT("p.GeometryCollectionEnableForcedConvexGenerationInSerialize"),
bGeometryCollectionEnableForcedConvexGenerationInSerialize,
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/GeometryCollectionEngine/Private/GeometryCollection/GeometryCollectionObject.cpp:139
Scope (from outer to inner):
file
function UGeometryCollection::UGeometryCollection
Source code excerpt:
SimulationDataGuid = StateGuid;
RenderDataGuid = StateGuid;
bStripOnCook = GeometryCollectionAssetForceStripOnCook;
#endif
PhysicsMaterial = GEngine? GEngine->DefaultPhysMaterial: nullptr;
}
FGeometryCollectionLevelSetData::FGeometryCollectionLevelSetData()
: MinLevelSetResolution(5)