Announcement

Collapse
No announcement yet.

Cleanup unused content

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

    #16
    Did you ever find out the correct command line? I need a step by step on how to do this.

    Comment


      #17
      I find the easiest way to get a clean project of my assets used, is to migrate the maps into an empty project :
      1. Create an empty project, without starter content, say name it ProjectNamePurged
      2. Go to the working project (the one "stuffed" with all the assets you were using while working on it)
      3. In the content browser, navigate to maps folder, select all the maps and migrate them to ProjectNamePurged


      I put all my assets in my levels so that will purge all redundant assets.
      However say you have those useful extra assets, that though not used yet, might come in handy and you want to keep them packaged: Select them in additon to the maps or make an extra map and place instances of them in that, say name it Repository
      Christos Symeon
      exés - www.csimeon.gr
      architecture + project management + construction

      Comment


        #18
        This might sound simple to implement but it has to work in all situations and many projects contain assets (usually curves) which are referenced from code only. This isn't good practice but it's not that uncommon (for instance, Unreal Tournament and the KiteDemo does it). Those won't show up as a reference and this asset would be cleaned up, leaving your build broken. There are ways around this obviously but it's not as simple as to just search for actors that hold a reference to the asset.

        Comment


          #19
          If those assets are referenced from code, then you can add them back manually. The migration tool works wonderful. It is much better than manually cleaning up unreferenced assets.

          Comment


            #20
            What migration tool? The 'migrate' action in the editor?

            Well, of course you can add those back manually just like you can delete your assets manually as well, something you just said you'd rather have automated for you. Duh.

            Comment


              #21
              Originally posted by Stefan Lundmark View Post
              What migration tool? The 'migrate' action in the editor?
              Right click on the asset (often on the map) -> Asset Action -> Migrate.

              We have thousands of unreferenced asset being removed this way (migrated), and none get added manually - it just works. The manual thing is usually very minimal.. again it depends..

              The thing is it is a lot harder to create an automated tool that also scan your C++ source code for any referenced assets. That is the point.

              Comment


                #22
                Originally posted by Stefan Lundmark View Post
                .... Those won't show up as a reference and this asset would be cleaned up, leaving your build broken. There are ways around this obviously but it's not as simple as to just search for actors that hold a reference to the asset.
                What ways do you suggest?
                Christos Symeon
                exés - www.csimeon.gr
                architecture + project management + construction

                Comment


                  #23
                  Originally posted by csimeon View Post
                  What ways do you suggest?
                  You could parse the source files, or let UBT cache this somewhere each build. That only works for static references so still not 100% safe, but it's a start. I try to stay away from referencing assets from code but sometimes it's really useful.

                  Comment

                  Working...
                  X