ActorSequence.DefaultEvaluationType

ActorSequence.DefaultEvaluationType

#Overview

name: ActorSequence.DefaultEvaluationType

This variable is created as a Console Variable (cvar).

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 named CVarDefaultEvaluationType. The default value is set to 0, which corresponds to playback locked to playback frames.

The associated variable CVarDefaultEvaluationType directly interacts with ActorSequence.DefaultEvaluationType. They share the same value and purpose.

Developers should be aware that:

  1. The variable accepts two values: 0 for frame-locked playback, and 1 for unlocked playback with sub-frame interpolation.
  2. This setting affects the default behavior of all actor sequences in the project.
  3. The value can be changed at runtime through console commands.

Best practices when using this variable include:

  1. Consider the performance implications of using unlocked playback with sub-frame interpolation, especially for complex sequences or on lower-end hardware.
  2. Ensure consistency across your project by setting this variable appropriately for your needs early in development.
  3. Document any changes to this default setting to maintain consistency across the development team.

Regarding the associated variable CVarDefaultEvaluationType:

#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);