- Home /
Relative asset paths
Hi everyone. Recently I am making a game with a friend, and we are using SVN to store our entire project. The problem is that we he updates the local copy and open the Unity, all scene is messed up, he loses all links to prefabs and all objects that should be on stage are gone. I think this happens because the absolute path that unity input in my assets, pointing to the full location on my hard drive, and since my friend try to open these same files in his context, the program cant find the full location reference and messes with it. Is there any way that I could use relative paths to the Unity Project? I tryed once use the Asset Server, but its too far complicated and I could not setup.
Thanks any advice.
Unity works perfectly, and best with subversion. You should not use any other source control system with Unity.
It's very likely you simply forgot to exclude the Library and Temp folders - that's all there is to it.
With Unity you ONLY put Assets/ and ProjectSettings/ under source control, you must put both of those under source control and no others.
Answer by syclamoth · Mar 12, 2012 at 04:55 PM
Are you storing the entire project including the library folder? In any case, using default settings, Unity has a tendency to break terribly if you try to use it with SVN. The Asset Server is one solution for this- if you're intent on using source control for the entire project, you should really look into that again.
The problem is not to do with relative asset paths. I regularly carry large projects around on portable hard-drives, and they work perfectly just copied down to the computer on which I am currently working. Windows, Mac, it all works. I think your problem is to do with corrupt metadata.
As of 3.5 you can store metadata inline with the Assets folder, avoiding the need for a complicated Library folder! Go to the 'Editor' settings in your project, and change the Version Control mode to 'Meta Files'- this will enable support for external version control.
Having done this, you should add the Assets and ProjectSettings folders to your version control, ignoring the Library and Temp folders. This should allow you to synchronise your projects easily.
Oh! Thank you very much! I was once interested in asset server, but I could not set up properly and I gave up. And when using SVN I put assets and project settings under version control, but I did not work either. But one thing i think i missed. The $$anonymous$$eta Data control options. I will try that! Thanks for the advice!! =D
I think the '$$anonymous$$eta' flag allows Unity to completely rebuild the library folder if it goes missing.
Your answer
Follow this Question
Related Questions
Access assets from project window through code 1 Answer
How to get an object (asset) from his path ? 1 Answer
How to auto-navigate project hierarchy to asset by clicking in inspector? (Doesn't work anymore.) 1 Answer
Asset store login problems 1 Answer
How should I organize a project for asset store submission? 2 Answers