ActorSequence.DefaultEvaluationType
ActorSequence.DefaultEvaluationType
#Overview
name: ActorSequence.DefaultEvaluationType
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
0: Playback locked to playback frames\n1: Unlocked playback with sub frame interpolation
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ActorSequence.DefaultEvaluationType is to control the default evaluation type for actor sequences in Unreal Engine 5. It determines whether playback is locked to playback frames or uses unlocked playback with sub-frame interpolation.
This setting variable is primarily used by the ActorSequence plugin, which is part of the MovieScene system in Unreal Engine. The ActorSequence plugin allows for the creation and playback of sequences within individual actors.
The value of this variable is set through a console variable (CVar) system. It’s defined as a TAutoConsoleVariable
The associated variable CVarDefaultEvaluationType directly interacts with ActorSequence.DefaultEvaluationType. They share the same value and purpose.
Developers should be aware that:
- The variable accepts two values: 0 for frame-locked playback, and 1 for unlocked playback with sub-frame interpolation.
- This setting affects the default behavior of all actor sequences in the project.
- The value can be changed at runtime through console commands.
Best practices when using this variable include:
- Consider the performance implications of using unlocked playback with sub-frame interpolation, especially for complex sequences or on lower-end hardware.
- Ensure consistency across your project by setting this variable appropriately for your needs early in development.
- Document any changes to this default setting to maintain consistency across the development team.
Regarding the associated variable CVarDefaultEvaluationType:
- Its purpose is identical to ActorSequence.DefaultEvaluationType, serving as the actual console variable that stores and provides the value.
- It’s used within the ActorSequence plugin to set the evaluation type of newly created actor sequences.
- The value is typically read using the GetValueOnGameThread() method when initializing new actor sequences.
- Developers should be aware that changing this CVar will affect all newly created actor sequences, but won’t automatically update existing ones.
- Best practices include using this CVar for global settings and allowing for per-sequence overrides where necessary in your project’s implementation.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/MovieScene/ActorSequence/Source/ActorSequence/Private/ActorSequence.cpp:21
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarDefaultEvaluationType(
TEXT("ActorSequence.DefaultEvaluationType"),
0,
TEXT("0: Playback locked to playback frames\n1: Unlocked playback with sub frame interpolation"),
ECVF_Default);
static TAutoConsoleVariable<FString> CVarDefaultTickResolution(
TEXT("ActorSequence.DefaultTickResolution"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarDefaultEvaluationType
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/MovieScene/ActorSequence/Source/ActorSequence/Private/ActorSequence.cpp:20
Scope: file
Source code excerpt:
#endif
static TAutoConsoleVariable<int32> CVarDefaultEvaluationType(
TEXT("ActorSequence.DefaultEvaluationType"),
0,
TEXT("0: Playback locked to playback frames\n1: Unlocked playback with sub frame interpolation"),
ECVF_Default);
static TAutoConsoleVariable<FString> CVarDefaultTickResolution(
#Loc: <Workspace>/Engine/Plugins/MovieScene/ActorSequence/Source/ActorSequence/Private/ActorSequence.cpp:89
Scope (from outer to inner):
file
function void UActorSequence::PostInitProperties
Source code excerpt:
ObjectReferences.CreateBinding(BindingID, FActorSequenceObjectReference::CreateForContextActor());
const bool bFrameLocked = CVarDefaultEvaluationType.GetValueOnGameThread() != 0;
MovieScene->SetEvaluationType( bFrameLocked ? EMovieSceneEvaluationType::FrameLocked : EMovieSceneEvaluationType::WithSubFrames );
FFrameRate TickResolution(60000, 1);
TryParseString(TickResolution, *CVarDefaultTickResolution.GetValueOnGameThread());
MovieScene->SetTickResolutionDirectly(TickResolution);