Announcement

Collapse
No announcement yet.

Delete all unused assets

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [FEATURE REQUEST] Delete all unused assets

    I have a project that has about 60 gb and most of the assets that is in project are not used in any maps and it's hard to delete them manually. It also takes a lot of time to do it, while the same I could spend on other more useful activities. Please answer when this function would be available or is there any way to do it manually?

    #2
    +1 i think its really necessary

    Comment


      #3
      +1 I am also for this
      Assets: Military Ammunition (Released)
      Plugins: BlueManBPFunctionLibrary C++ plugin (Free), Blue Man Vehicle AI Plugin (Released), Air Resistance C++ Plugin (WIP), Blue Man Vehicle Physics Plugin (Marketplace)
      Projects: Giants Of Destruction

      Comment


        #4
        It is already inside UE4 Editor, although it is not exactly one button 'cleanup my assets, please'
        1) Create a new project (this is supposed to be the clean project with all needed asset)
        2) Inside UE4 Editor, working with existing project (which has many unneeded asset), select a level and then right click, Asset Action -> Migrate.
        3) Migrate to the new project just created (select the Content folder).
        4) The migration will copy all referenced asset to the new project
        5) Repeat for all levels.

        Comment


          #5
          I'd change this into a show unused assets. There might be some stuff you're not using yet but plan to do so in the near future.

          Comment


            #6
            +1, cleaning up is not easy. Any feature that could help here would be very useful for a lot of people at all stages of a project

            Comment


              #7
              Originally posted by Mootjuh View Post
              I'd change this into a show unused assets. There might be some stuff you're not using yet but plan to do so in the near future.
              This.

              Already time consuming enough to double check if old reference files and empty folders are deleted. And if you want to make this sophisticated add an option to search for double assets.
              [LEGENDS of EPICA Now on Steam] [Twitter] - [Discord]

              Comment


                #8
                +1 for this, but with a minor change. Would it be possible to fix the content browser finally? Since long time when i move a folder into an another its still not moved and i have to delete the files manually + do "fix up object redirectors in folder". And its really a pain

                Comment


                  #9
                  Oh yes, +1.

                  Comment


                    #10
                    Thanks for the feedback, votes and +1's y'all! I've put this into a request and am getting into the right people's hands. Please let us know if there are any other specifics of how you would like this to function so I can have it in the report.
                    Twitch /unrealalexander| Twitter @UnrealAlexander
                    How to report a bug? | Installation & Setup issues?
                    Call me to a thread by posting this: [MENTION]Alexander Paschall[/MENTION]

                    Comment


                      #11
                      Originally posted by unit23 View Post
                      This.

                      Already time consuming enough to double check if old reference files and empty folders are deleted. And if you want to make this sophisticated add an option to search for double assets.
                      +1 for this

                      Comment


                        #12
                        Originally posted by Alexander Paschall View Post
                        Thanks for the feedback, votes and +1's y'all! I've put this into a request and am getting into the right people's hands. Please let us know if there are any other specifics of how you would like this to function so I can have it in the report.

                        Could it be really just a command that you can perform in the editor. Right click on the content browser and have a CleanUp unreferenced assets that provides a list of assets that will be deleted and unselect assets that you want to skip. Finally you could confirm and it would perform a cleanup and delete every asset that is not used.

                        Comment


                          #13
                          UE4 has WrangleContentCommandlet which should remove all unused assets, it is undocumented feature and may not work very well.
                          It can be launched this way:

                          Code:
                          UE4Editor.exe "Myproject\MyProject.uproject" -run=WrangleContent -allmaps
                          It may take some additional parameters to setup it's behavior:

                          Code:
                          // overall commandlet control options
                          bool bShouldRestoreFromPreviousRun = FParse::Param(*Params, TEXT("restore"));
                          bool bShouldSavePackages = !FParse::Param(*Params, TEXT("nosave"));
                          bool bShouldSaveUnreferencedContent = !FParse::Param(*Params, TEXT("nosaveunreferenced"));
                          bool bShouldDumpUnreferencedContent = FParse::Param(*Params, TEXT("reportunreferenced"));
                          bool bShouldCleanOldDirectories = !FParse::Param(*Params, TEXT("noclean"));
                          bool bShouldSkipMissingClasses = FParse::Param(*Params, TEXT("skipMissingClasses"));
                          
                          // what per-object stripping to perform
                          bool bShouldStripLargeEditorData = FParse::Param(*Params, TEXT("striplargeeditordata"));
                          bool bShouldStripMips = FParse::Param(*Params, TEXT("stripmips"));
                          
                          // package loading options
                          bool bShouldLoadAllMaps = FParse::Param(*Params, TEXT("allmaps"));
                          
                          // if no platforms specified, keep them all
                          UE_LOG(LogContentCommandlet, Warning, TEXT("Keeping platform-specific data for ALL platforms"));
                          
                          FString SectionStr;
                          FParse::Value( *Params, TEXT( "SECTION=" ), SectionStr );

                          Comment


                            #14
                            Originally posted by Pierdek View Post
                            UE4 has WrangleContentCommandlet which should remove all unused assets, it is undocumented feature and may not work very well.
                            It can be launched this way:

                            Code:
                            UE4Editor.exe "Myproject\MyProject.uproject" -run=WrangleContent -allmaps
                            It may take some additional parameters to setup it's behavior:

                            Code:
                            // overall commandlet control options
                            bool bShouldRestoreFromPreviousRun = FParse::Param(*Params, TEXT("restore"));
                            bool bShouldSavePackages = !FParse::Param(*Params, TEXT("nosave"));
                            bool bShouldSaveUnreferencedContent = !FParse::Param(*Params, TEXT("nosaveunreferenced"));
                            bool bShouldDumpUnreferencedContent = FParse::Param(*Params, TEXT("reportunreferenced"));
                            bool bShouldCleanOldDirectories = !FParse::Param(*Params, TEXT("noclean"));
                            bool bShouldSkipMissingClasses = FParse::Param(*Params, TEXT("skipMissingClasses"));
                            
                            // what per-object stripping to perform
                            bool bShouldStripLargeEditorData = FParse::Param(*Params, TEXT("striplargeeditordata"));
                            bool bShouldStripMips = FParse::Param(*Params, TEXT("stripmips"));
                            
                            // package loading options
                            bool bShouldLoadAllMaps = FParse::Param(*Params, TEXT("allmaps"));
                            
                            // if no platforms specified, keep them all
                            UE_LOG(LogContentCommandlet, Warning, TEXT("Keeping platform-specific data for ALL platforms"));
                            
                            FString SectionStr;
                            FParse::Value( *Params, TEXT( "SECTION=" ), SectionStr );
                            Whenever I tried this command, it never did anything.

                            Comment


                              #15
                              Code:
                              UE4Editor-Cmd.exe "Myproject\MyProject.uproject" -run=WrangleContent -allmaps
                              Try using "UE4Editor-Cmd.exe" instead of "UE4Editor.exe".

                              Comment

                              Working...
                              X