Moving and Copying Unity Assets

From Unify Community Wiki
Revision as of 18:35, 5 August 2006 by NCarter (Talk | contribs)

Jump to: navigation, search

Never use the Finder to move assets in your Unity projects

Unity stores a lot of metadata with its assets. This might be import settings for a texture or model file, or simply references to other files in the same project. For example, a material referencing a texture, or a prefab referencing a material.

References to other files do not depend upon path names in Unity. This allows you to reorganise your files whenever you want without the risk of Unity losing track of the connections between objects.

The drawback is that you can't just drag files from project to project using the Finder or any other external tool. You must use the Unity project pane to move items or references to them will be broken, and items in your project are likely to stop working.

Also, if you want to copy files from one project to another, use Assets→Export Package and Assets→Import Package. That will copy all the meta data and retain all references to other files.

If you are using SCM software such as Subversion or CVS, you must be very careful to ensure that these tools do not cause files to be moved or deleted. Note that the use of SCM with Unity is not recommended, although it is feasible if used carefully.

In summary

  • Use the Unity GUI to move files within the project; never allow the Finder or any other tool to move the files.
  • Use Assets→Export Package and Assets→Import Package to copy items from one project to another.

See also

Personal tools