-
Notifications
You must be signed in to change notification settings - Fork 28
Command line interface
Plugin have CLI interface for performing all operations from command line.
- Make sure 'ProjectCleaner' plugin is installed in project and enabled!
- Open Terminal
- Go to folder
{Location_Where_Engine_Installed}/UE_4.26/Engine/Binaries/Win64
- Run cli to fixup redirectors
UE4Editor.exe <GameName or uproject> -run=ResavePackages -fixupredirects -autocheckout -projectonly -unattended
- Run
UE4Editor-Cmd.exe "{path_to_your_project}" -run=ProjectCleanerCLI {args}
- Run
UE4Editor-Cmd.exe "{path_to_your_project}" -run=Pjc {args}
Example:
Engine Installed path : W:\ue4_versions\UE_4.26\Engine\Binaries\Win64
Project path : C:\dev\ue4\MyProject
./UE4Editor-Cmd.exe "C:\dev\ue4\MyProject\MyProject.uproject" -run=ProjectCleanerCLI
- -Check
- -ScanDevContent
- -DeleteEmptyFolders
- -ExcludeAssets = "/Game/Path1/Asset1.uasset , /Game/Path2/Asset2.uasset"
- -ExcludeAssetsInPath = "/Game/Blueprint/"
- -ExcludeAssetWithClass= "Blueprint,Material"
-
- scan_only - will scan project and print result, no any cleaning operations performed
-
- full_cleanup - will delete all unused assets and empty folders in project
-
- delete_assets_unused - flag to delete unused assets
-
- delete_folders_empty - flag to delete empty folders
-
- delete_files_external - flag to delete external files
-
- delete_files_corrupted - flag to delete corrupted asset files
In v2.0.0 exclude settings must be specified in editor inside ProjectCleaner plugin window.
Shows only statistics. Wont perform any delete operations.
Scan Developer Content folder or not
Delete empty folders after unused assets deleted or not
Exclude given assets.
Must be asset object path and seperated with comma if multiple assets.
-ExcludeAssets="/Game/StarterContent/Textures/T_Wood_Walnut_N.T_Wood_Walnut_N"
-ExcludeAssets="/Game/StarterContent/Textures/T_Wood_Walnut_N.T_Wood_Walnut_N,/Game/StarterContent/Props/SM_Statue.SM_Statue"
Exclude all assets in given paths
-ExcludeAssetsInPath="/Game/Blueprints,/Game/Materials"
Exclude assets with given class
-ExcludeAssetsWithClass="Material"
-ExcludeAssetsWithClass="Material,Texture2D"
If no arguments given, then default settings will be used, which are
- ScanDevContent = false
- DeleteEmptyFolders = true
- No excluded assets
If you see this type of error in terminal
That means that plugin disabled in project.
You must enable it and try again.