How do you organize your art and audio source files in your projects?

I have never been sure what the best way to handle asset source files in a project is, meaning files that are used to create exported files used by the engine rather than source cod files. Examples would be .psd or .xcf and .blend files for textures and models. Same goes for audio, with there being a whole bunch of different source formats depending on what program you use to create the exported audio files.

I want these files to be included in version control but don’t want them to show up in my assets in the Unity editor since they aren’t ever used by the engine or editor itself and only cause unnecessary confusion with the exported files, so my solution for now has been to create a folder called AssetsSource next to Assets in the project directory. That way it can be included in version control but the source files do not show up in the asset browser in the editor.

I’m curious if there is a better way though, how do you guys organize your files?

The big question here is always: WHY? :wink:

You do not get versioning. Either these files are binary, or their format is so complex that diffs don’t make sense, may even slow down source control operations and thus forcing you to mark files of that type as binary regardless.

You do get a commit history of each file, but when they are binary and the file is 10 MB in size, every new commit will add 10 MB to your repository size. You can imagine what that leads to after the 100th commit. Or a file that’s 100 MB.

Doing so might just a) slow down source control altogether or b) force you to spend extra $$$ on files that shouldn’t be versioned to begin with.

I would write a simple exporter script in the native editors so the designer doesn’t need to go through dialogs and click checkboxes (and make mistakes) every time. Since you ought to have that already, it shouldn’t be hard to also create a numbered/dated backup of the source file on every export somewhere on the company’s Intranet or a cloud sync folder. That way you keep a history of these files (which you’ll very, very rarely need).

If I were to include source assets in source control, I would not store them within the project tree but next to it. For example:

  • /SourceAssets
  • /SourceAssets/Meshes/…
  • /TheProject
  • /TheProject/Assets/…

But since Unity supports some of the source assets natively, I believe .psd and .blend are among them, you could store them within your Assets tree and use them as the authoritative asset.

However these tend to be rather large and I wonder if those won’t also significantly slow down the editor compared to PNG/JPG and FBX files.