Moving and Copying Unity Assets

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
m
(Lots of rewording, added note about SCM)
Line 1: Line 1:
==NEVER use the Finder to move or copy assets.==
+
== Never use the Finder to move assets in your Unity projects ==
If you want to move or copy assets within a Unity project, do it using the Unity GUI.
+
  
'''NEVER use the Finder to move or copy assets.'''
+
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.  
  
If you want to move or copy assets between different Unity projects, use "Assets -> export package" and "Assets -> import package."
+
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.
  
'''NEVER use the Finder to move or copy assets.'''
+
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.
  
'''OTEE Says'''
+
If you are using [http://en.wikipedia.org/wiki/SCM SCM] software such as [http://subversion.tigris.org/ Subversion] or [http://www.nongnu.org/cvs/ CVS], you must be very careful to ensure that these tools do not cause files to be moved or deleted.  Note that the [[Using SCM with Unity|use of SCM with Unity]] is not recommended, although it is feasible if used carefully.
*''NEVER copy files in a unity project around using the finder.  
+
  
Unity stores a lot of meta data with all it's assets. This can be import settings for a texture or maya mb file. Or simply references to other files in the same project. Eg. a material referencing a texture, a prefab referencing a material.
+
== In summary ==
  
References to other files are not based on path names in unity. This allows you to move files around arbitrarily and things still just work.  
+
*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.
  
This is extremely nice when you have a project which became very messy over time and it is time to clean up. You can rely on that moving files around will just work. And you don't have to wait until your next project to keep your project folders clean and easy to maintain.
+
== See also ==
  
The only thing you have to do is, move files around in the unity GUI and not in the finder.
+
*The [http://forum.otee.dk/viewtopic.php?t=1253#7875 original thread] at the Unity forum.'''
 
+
 
+
The drawback is, you can't just copy&paste files in the finder from project to project.
+
 
+
So 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.''
+
 
+
'''You can [[http://forum.otee.dk/viewtopic.php?t=1253#7875 read more about this]] at the Unity forums.'''
+

Revision as of 18:33, 5 August 2006

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
Namespaces

Variants
Actions
Navigation
Extras
Toolbox