Drag & Drop file into unity always creates new asset, how to overwrite?

When I drag and drop and art file into unity’s project window a new reference and a new meta file is created. If my artist then changes the artwork’s source file and sends me a new file to drop into unity I would like to to drag and drop this into unity’s project window as before but have it overwrite the previously imported file.

Instead what happens is unity creates a new file & meta file and appends " 1" to it, so now I have two versions of the art file in unity. In order to update the file I have to click on the file I want to replace, select “reveal in finder” (it’s a mac), and then overwrite the source file through the finder.

Is there no way to overwrite an asset by dragging into the project window? Say by holding shift while doing the drag and drop or something?

1 Like

First, prepare your project to be versioned, go to:
Edit / Project Settings / Editor

And enable:

  • Version control mode = Visible Meta Files
  • Asset serialization = Force Text

Then, for any asset you wish to replace, simply:

  • right click on the asset you wish to replace
  • Open in Explorer
  • In your file explorer, copy and overwrite the existing asset (make sure it has it’s .meta file next to it, do not replace or remove that!)

Unity will automatically figure out that it’s original asset has changed, it will re-import the asset and replace all instances of the old asset with your new one (so you don’t have to place it yourself again).

This method particularily works great with textures, you will see the new textures pop up on your objects even during runtime or paused play mode states, which is really great for rapid prototyping.

As for the core of the question, can you do it directly from Unity - I do not think so. You can manually delete, re-import and re-assign the new asset, but it’s just faster to keep a file explorer window open all the time for fast replace.