LOAD

LOAD

#Overview

name: LOAD

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 LOAD is to handle various loading operations across different subsystems and modules in Unreal Engine 5. This setting variable is used in multiple contexts, each serving a specific purpose within the engine.

Based on the callsites provided, the LOAD variable is utilized by the following Unreal Engine subsystems, plugins, or modules:

  1. OnlineSubsystemTencent plugin
  2. UnrealEd module (Editor functionality)

The value of this variable is not set directly in the provided code snippets. Instead, it’s used as a command identifier in different parsing scenarios.

Other variables that interact with LOAD are context-dependent. For example, in the OnlineSubsystemTencent plugin, it interacts with the RailSdkWrapper.

Developers must be aware of the following when using this variable:

  1. It’s used in different contexts, so its behavior may vary depending on where it’s used.
  2. In some cases, it’s associated with deprecated functionality (as seen in the EditorServer.cpp file).
  3. It’s often used as part of command parsing logic, so proper command syntax is crucial.

Best practices when using this variable include:

  1. Be aware of the specific context in which LOAD is being used.
  2. Check for deprecation notices and avoid using deprecated functionality.
  3. When implementing new features, consider using more modern alternatives if LOAD is associated with older systems.
  4. Ensure proper error handling and logging when using LOAD-related functionality.
  5. Document the specific use case and behavior of LOAD in your implementation to avoid confusion with its various uses throughout the engine.

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemTencent/Source/Private/OnlineSubsystemTencent.cpp:1115

Scope (from outer to inner):

file
function     bool FOnlineSubsystemTencent::HandleRailSdkWrapperExecCommands

Source code excerpt:

{
#if WITH_TENCENT_RAIL_SDK
	if (FParse::Command(&Cmd, TEXT("LOAD")))
	{
		const bool bResult = RailSdkWrapper::Get().Load();
		UE_LOG_ONLINE(Display, TEXT("RailSdkWrapper Load: %d"), static_cast<int32>(bResult));
	}
	else if (FParse::Command(&Cmd, TEXT("SHUTDOWN")))
	{

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/EditorServer.cpp:422

Scope (from outer to inner):

file
function     bool UEditorEngine::SafeExec

Source code excerpt:

		return true;
	}
	else if( FParse::Command( &Str, TEXT("LOAD") ) )
	{
		FMessageDialog::Open( EAppMsgType::Ok, FText::Format(NSLOCTEXT("UnrealEd", "Error_TriedToExecDeprecatedCmd", "Tried to execute deprecated command: {0}"),FText::FromString(FullStr)) );
	}
	else if( FParse::Command( &Str, TEXT("MESHMAP")) )
	{
		FMessageDialog::Open( EAppMsgType::Ok, FText::Format(NSLOCTEXT("UnrealEd", "Error_TriedToExecDeprecatedCmd", "Tried to execute deprecated command: {0}"),FText::FromString(FullStr)) );

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/EditorServer.cpp:921

Scope: file

Source code excerpt:

		return true;
	}
	else if( FParse::Command (&Str,TEXT("LOAD")) ) // BRUSH LOAD
	{
		FString TempFname;
		if( FParse::Value( Str, TEXT("FILE="), TempFname ) )
		{
			const FScopedBusyCursor BusyCursor;

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/EditorServer.cpp:6101

Scope (from outer to inner):

file
function     bool UEditorEngine::HandleMapCommand

Source code excerpt:

		return CommandIsDeprecated( TEXT("NEW"), Ar );
	}
	else if( FParse::Command( &Str, TEXT("LOAD") ) )
	{
		return Map_Load( Str, Ar );
	}
	else if( FParse::Command( &Str, TEXT("IMPORTADD") ) )
	{
		SelectNone( false, true );