Navigation
API > API/Runtime > API/Runtime/Engine
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 they type 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.
| Name | UCommandlet |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/Commandlets/Commandlet.h |
| Include Path | #include "Commandlets/Commandlet.h" |
Syntax
UCLASS (Abstract, Transient, MinimalAPI)
class UCommandlet : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UCommandlet
Derived Classes
UCommandlet derived class hierarchy
- UACLDatabaseBuildCommandlet
- UACLStatsDumpCommandlet
- UAssetRegistryDumpCommandlet
- UAssetRegUtilCommandlet
- UAssetSizeQueryCommandlet
- UAudioMixerCommandlet
- UBaseIteratePackagesCommandlet
- UCheckAndroidDeviceProfileCommandlet
- UCompileAllBlueprintsCommandlet
- UCompileShadersTestBedCommandlet
- UCompressAnimationsCommandlet
- UConvertLevelsToExternalActorsCommandlet
- UCookCommandlet
- UCookGlobalShadersCommandlet
- UCookShadersCommandlet
- UCopyNaniteFallbackSettingsToRayTracingProxyCommandlet
- UDataLayerToAssetCommandlet
- UDataValidationCommandlet
- UDDCCleanupCommandlet
- UDebugShaderCompileJobCommandlet
- UDerivedDataCacheCommandlet
- UDetectOrphanedLocalizedAssetsCommandlet
- UDiffAssetRegistriesCommandlet
- UDiffAssetsCommandlet
- UDiffCookCommandlet
- UDiffFilesCommandlet
- UDumpAssetRegistryCommandlet
- UDumpBlueprintsInfoCommandlet
- UDumpHiddenCategoriesCommandlet
- UDumpLightFunctionMaterialInfoCommandlet
- UDumpMaterialExpressionInfoCommandlet
- UDumpMaterialExpressionsCommandlet
- UDumpMaterialInfoCommandlet
- UDumpMaterialShaderTypesCommandlet
- UEditorDomainSaveCommandlet
- UExportPakDependenciesCommandlet
- UExternalActorsCommandlet
- UExtractLocResCommandlet
- UFileServerCommandlet
- UFixConflictingLocalizationKeysCommandlet
- UGameFeatureVersePathMapperCommandlet
- UGatherTextCommandletBase
- UGatherTextFromAssetsWorkerCommandlet
- UGenerateAssetManifestCommandlet
- UGenerateBlueprintAPICommandlet
- UGenerateDistillFileSetsCommandlet
- UImportAssetsCommandlet
- UIoStoreCommandlet
- ULandscapeGrassTypeCommandlet
- UListMaterialsUsedWithMeshEmittersCommandlet
- UListStaticMeshesImportedFromSpeedTreesCommandlet
- ULoadPackageCommandlet
- UMakeBinaryConfigCommandlet
- UMaterialLayerUsageCommandlet
- UMergeShaderPipelineCachesCommandlet
- UNiagaraDumpByteCodeCommandlet
- UNiagaraDumpModuleInfoCommandlet
- UNiagaraScriptValidationCommandlet
- UNiagaraStatelessAuditCommandlet
- UNiagaraSystemAuditCommandlet
- UNiagaraTraversalCacheAuditCommandlet
- UOodleNetworkTrainerCommandlet
- UParticleSystemAuditCommandlet
- UPkgInfoCommandlet
- UPluginCommandlet
- UPopulateDialogueWaveFromCharacterSheetCommandlet
- UReplaceActorCommandlet
- UReplaceAssetsCommandlet
- UResavePackagesCommandlet
- UShaderCodeLibraryToolsCommandlet
- UShaderPipelineCacheToolsCommandlet
- USmokeTestCommandlet
- UStabilizeLocalizationKeysCommandlet
- UStaticMeshMinLodCommandlet
- USubstrateCommandlet
- USummarizeTraceCommandlet
- USummarizeTraceEditorWorkflowsCommandlet
- USwapSoundForDialogueInCuesCommandlet
- UTextAssetCommandlet
- UUnitTestCommandlet
- UUnrealPakCommandlet
- UUpdateGameProjectCommandlet
- UWorldPartitionBuilderCommandlet
- UWorldPartitionConvertCommandlet
- UWrangleContentCommandlet
- UCryptoKeysCommandlet
- ULearningSocketPPOTrainerServerCommandlet
- UScreenshotComparisonCommandlet
- UTestPlainPropsCommandlet
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UCommandlet
(
const FObjectInitializer& ObjectInitializer |
Commandlets/Commandlet.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| FastExit | uint32 | Whether to exit the process as soon as the commandlet completes, skipping the engine shutdown | Commandlets/Commandlet.h | |
| HelpDescription | FString | Description of the commandlet's purpose | Commandlets/Commandlet.h | |
| HelpParamDescriptions | TArray< FString > | The description of the parameter | Commandlets/Commandlet.h | |
| HelpParamNames | TArray< FString > | The name of the parameter the commandlet takes | Commandlets/Commandlet.h | |
| HelpUsage | FString | Usage template to show for "ucc help" | Commandlets/Commandlet.h | |
| HelpWebLink | FString | Hyperlink for more info | Commandlets/Commandlet.h | |
| IsClient | uint32 | Commandlets/Commandlet.h | ||
| IsEditor | uint32 | Commandlets/Commandlet.h | ||
| IsServer | uint32 | Whether to load objects required in server, client, and editor context. | Commandlets/Commandlet.h | |
| LogToConsole | uint32 | Whether to redirect standard log to the console | Commandlets/Commandlet.h | |
| ShowErrorCount | uint32 | Whether to show standard error and warning count on exit | Commandlets/Commandlet.h | |
| ShowProgress | uint32 | Whether to show cooking progress on tick | Commandlets/Commandlet.h | |
| UseCommandletResultAsExitCode | uint32 | Whether to use the commandlet result as the exit code, even if errors were logged during the whole engine execution | Commandlets/Commandlet.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void CreateCustomEngine
(
const FString& Params |
Allows commandlets to override the default behavior and create a custom engine class for the commandlet. | Commandlets/Commandlet.h | |
virtual int32 Main
(
const FString& Params |
Entry point for your commandlet | Commandlets/Commandlet.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Apply the switched to internal values if they exists. | Commandlets/Commandlet.h | ||
static void ParseCommandLine
(
const TCHAR* CmdLine, |
Parses a string into tokens, separating switches (beginning with - or /) from other parameters | Commandlets/Commandlet.h | |
| Parses a string into tokens, separating switches (beginning with - or /) from other parameters | Commandlets/Commandlet.h |