AssetManager.LoadPrimaryAssetsWithType

AssetManager.LoadPrimaryAssetsWithType

#Overview

name: AssetManager.LoadPrimaryAssetsWithType

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

It is referenced in 2 C++ source files.

#Summary

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/AssetManager.cpp:5048

Scope: file

Source code excerpt:

// Cheat command to load all assets of a given type
static FAutoConsoleCommandWithWorldAndArgs CVarLoadPrimaryAssetsWithType(
	TEXT("AssetManager.LoadPrimaryAssetsWithType"),
	TEXT("Loads all assets of a given type"),
	FConsoleCommandWithWorldAndArgsDelegate::CreateStatic(
		[](const TArray<FString>& Params, UWorld* World)
{
	if (Params.Num() == 0)
	{

#Loc: <Workspace>/Projects/Lyra/Source/LyraGame/GameModes/LyraGameMode.cpp:209

Scope (from outer to inner):

file
function     void ALyraGameMode::HostDedicatedServerMatch

Source code excerpt:

	// Search for the matching experience, it's fine to force load them because we're in dedicated server startup
	ULyraAssetManager& AssetManager = ULyraAssetManager::Get();
	TSharedPtr<FStreamableHandle> Handle = AssetManager.LoadPrimaryAssetsWithType(UserExperienceType);
	if (ensure(Handle.IsValid()))
	{
		Handle->WaitUntilComplete();
	}

	TArray<UObject*> UserExperiences;