Sequencer.CompilerVersion

Sequencer.CompilerVersion

#Overview

name: Sequencer.CompilerVersion

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

It is referenced in 4 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of Sequencer.CompilerVersion is to define a global identifier for the MovieScene compiler logic in Unreal Engine 5. This setting variable is crucial for the Sequencer system, which is responsible for creating and managing cinematic sequences and animations in Unreal Engine.

Based on the callsites, this setting variable is primarily used in the MovieScene module, specifically within the compilation subsystem. It’s referenced in the MovieSceneCompiledDataManager class, which is part of the core runtime functionality for movie scenes.

The value of this variable is set as a string constant “7D4B98092FAC4A6B964ECF72D8279EF8” in the C++ code. It’s defined as a console variable, which means it can be accessed and potentially modified at runtime through the console system.

The associated variable GMovieSceneCompilerVersion interacts directly with Sequencer.CompilerVersion. They share the same value, and GMovieSceneCompilerVersion is used internally in the C++ code to represent the compiler version.

Developers must be aware that this variable is crucial for maintaining consistency in compiled movie scene data. Changes to this version identifier will trigger a recompilation of all movie scene data, which could have significant performance implications.

Best practices when using this variable include:

  1. Avoid modifying it unless absolutely necessary, as changes will invalidate all existing compiled movie scene data.
  2. If modifications are required, ensure that all dependent systems are updated accordingly.
  3. Use the console variable system to check the current version in debugging scenarios.

Regarding the associated variable GMovieSceneCompilerVersion:

The purpose of GMovieSceneCompilerVersion is to serve as the internal representation of the MovieScene compiler version within the C++ code.

It’s used directly in the MovieScene module, particularly in the MovieSceneCompiledDataManager class.

The value is set as a string constant in the C++ code, matching the value of Sequencer.CompilerVersion.

It interacts directly with Sequencer.CompilerVersion, essentially serving as its C++ counterpart.

Developers should be aware that this variable is parsed into a GUID (Globally Unique Identifier) for use in the MovieSceneCompiledDataManager. Any changes to its format could break this parsing process.

Best practices include ensuring that any modifications to GMovieSceneCompilerVersion are reflected in Sequencer.CompilerVersion, and vice versa, to maintain consistency across the system.

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/MovieScene/Private/Compilation/MovieSceneCompiledDataManager.cpp:28

Scope: file

Source code excerpt:

FString GMovieSceneCompilerVersion = TEXT("7D4B98092FAC4A6B964ECF72D8279EF8");
FAutoConsoleVariableRef CVarMovieSceneCompilerVersion(
	TEXT("Sequencer.CompilerVersion"),
	GMovieSceneCompilerVersion,
	TEXT("Defines a global identifer for moviescene compiler logic.\n"),
	ECVF_Default
);

#Associated Variable and Callsites

This variable is associated with another variable named GMovieSceneCompilerVersion. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Runtime/MovieScene/Private/Compilation/MovieSceneCompiledDataManager.cpp:26

Scope: file

Source code excerpt:



FString GMovieSceneCompilerVersion = TEXT("7D4B98092FAC4A6B964ECF72D8279EF8");
FAutoConsoleVariableRef CVarMovieSceneCompilerVersion(
	TEXT("Sequencer.CompilerVersion"),
	GMovieSceneCompilerVersion,
	TEXT("Defines a global identifer for moviescene compiler logic.\n"),
	ECVF_Default
);


TAutoConsoleVariable<bool> CVarAddKeepStateDeterminismFences(

#Loc: <Workspace>/Engine/Source/Runtime/MovieScene/Private/Compilation/MovieSceneCompiledDataManager.cpp:307

Scope (from outer to inner):

file
function     UMovieSceneCompiledDataManager::UMovieSceneCompiledDataManager

Source code excerpt:

UMovieSceneCompiledDataManager::UMovieSceneCompiledDataManager()
{
	const bool bParsed = FGuid::Parse(GMovieSceneCompilerVersion, CompilerVersion);
	ensureMsgf(bParsed, TEXT("Invalid compiler version specific - this will break any persistent compiled data"));

	IConsoleManager::Get().RegisterConsoleVariableSink_Handle(FConsoleCommandDelegate::CreateUObject(this, &UMovieSceneCompiledDataManager::ConsoleVariableSink));

	ReallocationVersion = 0;
	NetworkMask = EMovieSceneServerClientMask::All;

#Loc: <Workspace>/Engine/Source/Runtime/MovieScene/Private/Compilation/MovieSceneCompiledDataManager.cpp:385

Scope (from outer to inner):

file
function     void UMovieSceneCompiledDataManager::ConsoleVariableSink

Source code excerpt:

{
	FGuid NewCompilerVersion;
	const bool bParsed = FGuid::Parse(GMovieSceneCompilerVersion, NewCompilerVersion);
	ensureMsgf(bParsed, TEXT("Invalid compiler version specific - this will break any persistent compiled data"));

	if (CompilerVersion != NewCompilerVersion)
	{
		DestroyAllData();
	}