UCommandlet

Commandlet (command-line applet) class.

Windows
MacOS
Linux

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

UCommandlet

UAssetRegUtilCommandlet

UAudioMixerCommandlet

UAudioTestCommandlet

UCompileAllBlueprintsCommandlet

UCompressAnimationsCommandlet

UCookCommandlet

UCryptoKeysCommandlet

UDataValidationCommandlet

UDDCCleanupCommandlet

UDEPRECATED_DiffPackagesCommandlet

UDerivedDataCacheCommandlet

UDiffAssetRegistriesCommandlet

UDiffAssetsCommandlet

UDiffFilesCommandlet

UDumpBlueprintsInfoCommandlet

UDumpHiddenCategoriesCommandlet

UExportPakDependenciesCommandlet

UFileServerCommandlet

UFixConflictingLocalizationKeysCommandlet

UGatherTextCommandletBase

UExportDialogueScriptCommandlet

UGatherTextCommandlet

UGatherTextFromAssetsCommandlet

UGatherTextFromMetaDataCommandlet

UGatherTextFromSourceCommandlet

UGenerateGatherArchiveCommandlet

UGenerateGatherManifestCommandlet

UGenerateTextLocalizationReportCommandlet

UGenerateTextLocalizationResourceCommandlet

UImportDialogueScriptCommandlet

UImportLocalizedDialogueCommandlet

UInternationalizationConditioningCommandlet

UInternationalizationExportCommandlet

UGenerateAssetManifestCommandlet

UGenerateBlueprintAPICommandlet

UGenerateDistillFileSetsCommandlet

UImportAssetsCommandlet

UIoStoreCommandlet

UListMaterialsUsedWithMeshEmittersCommandlet

UListStaticMeshesImportedFromSpeedTreesCommandlet

ULoadPackageCommandlet

UMergeShaderPipelineCachesCommandlet

UNativeCodeGenCommandlet

UParticleSystemAuditCommandlet

UPkgInfoCommandlet

UPluginCommandlet

UPopulateDialogueWaveFromCharacterSheetCommandlet

UReplaceActorCommandlet

UReplaceAssetsCommandlet

UResavePackagesCommandlet

UFixupNeedsLoadForEditorGameCommandlet

UScreenshotComparisonCommandlet

UShaderCodeLibraryToolsCommandlet

UShaderPipelineCacheToolsCommandlet

USmokeTestCommandlet

UStabilizeLocalizationKeysCommandlet

USwapSoundForDialogueInCuesCommandlet

UTextAssetCommandlet

UUnitTestCommandlet

UUnrealPakCommandlet

UUpdateGameProjectCommandlet

UWrangleContentCommandlet

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Commandlets/Commandlet.h

Include

#include "Commandlets/Commandlet.h"

Syntax

class UCommandlet : public UObject

Remarks

Commandlet (command-line applet) class.

Commandlets are executed from the ucc.exe command line utility, using the following syntax: yourgame.exe package_name.commandlet_class_name [parm=value]...

for example: yourgame.exe Core.HelloWorldCommandlet yourgame.exe UnrealEd.CookCommandlet

As a convenience, if a user tries to run a commandlet and the exact name he types isn't found, then ucc.exe appends the text "commandlet" onto the name and tries again. Therefore, the following shortcuts perform identically to the above: yourgame.exe Core.HelloWorld yourgame.exe UnrealEd.Make

Commandlets are executed in a "raw" environment, in which the game isn't loaded, the client code isn't loaded, no levels are loaded, and no actors exist.

To disable shader compiling during the run of the commandlet add "-NoShaderCompile" to the commandline. This would be added as data member setting except that the shader compiler is initialized before a commandlet is created so it cannot be queried soon enough.

Variables

Name Description

Public variable

FString

 

HelpDescription

Description of the commandlet's purpose

Public variable

TArray< FString...

 

HelpParamDescriptions

The description of the parameter

Public variable

TArray< FString...

 

HelpParamNames

The name of the parameter the commandlet takes

Public variable

FString

 

HelpUsage

Usage template to show for "ucc help"

Public variable

FString

 

HelpWebLink

Hyperlink for more info

Public variable

uint32: 1

 

IsClient

Public variable

uint32: 1

 

IsEditor

Public variable

uint32: 1

 

IsServer

Whether to load objects required in server, client, and editor context.

Public variable

uint32: 1

 

LogToConsole

Whether to redirect standard log to the console

Public variable

uint32: 1

 

ShowErrorCount

Whether to show standard error and warning count on exit

Public variable

uint32: 1

 

ShowProgress

Whether to show cooking progress on tick

Constructors

Name Description

Public function

UCommandlet

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Virtual

void

 

CreateCustomEngine

(
    const FString& Params
)

Allows commandlets to override the default behavior and create a custom engine class for the commandlet.

Public function Virtual

int32

 

Main

(
    const FString& Params
)

Entry point for your commandlet

Public function Static

void

 

ParseCommandLine

(
    const TCHAR* CmdLine,
    TArray< FString >& Tokens,
    TArray< FString >& Switches
)

Parses a string into tokens, separating switches (beginning with - or /) from other parameters

Public function Static

void

 

ParseCommandLine

(
    const TCHAR* CmdLine,
    TArray< FString >& Tokens,
    TArray< FString >& Switches,
    TMap< FString, FString >& Params
)

Parses a string into tokens, separating switches (beginning with - or /) from other parameters

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss