What is the best way to handle updating existing asset packages?

There are lots of great asset packages out on the Unity Asset Store. However, I’ve found that dealing with those packages (particularly those that are frequently updated) and the Unity Asset Server is troublesome to say the least.

Initially I had put all of my imported asset packages into a separate folder called “Third-party Systems”. I wanted to keep things more organized than just having a ton of root folders for each package I imported.

This worked great until I had to update one of those packages. When you try to import a new version of an asset package it installs it back into the original location as defined by the package creator. Unity doesn’t allow you to modify this. So, then you temporarily end up with two copies of every script file, which obviously, won’t compile. But you also can’t then just delete your old package, because the links from all of your GameObjects are to those specific script files and those links will be broken, effectively destroying a lot of your work.

So, it seems that the best way to handle asset packages (though this greatly annoys me), is always leaving all imported assets in their original location. Things tend to work better this way, but particularly with the Asset Server, things can still get wonky. There are situations I’ve found where files won’t be updated when pulling down new versions from the Asset Server. Deprecated files aren’t deleted. You end up with duplicate files, compile errors, and other general nastiness.

Sometimes things are broken even when just dealing with files locally. I recently tried to update my NGUI (a UI scripting asset package from the Store) installation to a newer version. If I just import the package, I get compile errors. If I delete my old installation, then import the new version, I get no compile errors, but all my GameObject Component links are broken. I can’t win.

I’ve just never found a way to handle updating existing asset packages and have it work seamlessly, especially with the Asset Server. Updating our packages (particularly the script heavy ones like NGUI) has always been a painful ordeal. Just wondering if anyone has any tips for how to handle this better.

So, everything I’m about to say is based on my experiences and my company’s workflow. It may (and probaby does) differ or not work for other people.

Think outside the box.

The best way to deal with third party tools is to not change them at all. Like you said, moving the location of the files means updating will not be an easy task. You have no control over that. But what you do have control of is your assets. Instead, move your assets into a directory that contains all of YOUR game’s assets. This creates an easy separation between assets created by you and assets from third party tools.

For instance, your directory would look something like this:

  • MyGameName
    • Editor
    • Textures
    • Models
    • Materials
    • Animations
    • Shaders
    • Scripts
  • NGUI
    • NGUI stuff
  • TK2D
    • T2dk stuff
  • Standard Assets
  • Plugins

NGUI author himself says, don’t use the asset server. If you haven’t realized, it isn’t source control. No supported way to back out changes, no way to get it to correctly check in such changes, horribly deconfliction support, etc.