- Home /
Unity Library folder vs. Source control
I started a Unity project that use GIT/GITHUB has a source control. I've read on the web that people suggest to not put the Library folder inside the source control because it change often and contain mostly binary data (which can't merge correctly).
But, I've noticed that my GameObject was loosing there Script component if the Library doesn't follow the Asset package. Resulting in a "MonoBehaviour: A MonoBehaviour Script is missing" error where the component should be.
After some research, I found that: "When backing up a project, you should always back up the main Unity project folder, containing both the Assets and Library folders. All the information in the subfolders is crucial to the way Unity works. "http://docs.unity3d.com/Documentation/Manual/BehindtheScenes.html
What should I do? Did any of you had this problem before?
Answer by insominx · Feb 13, 2013 at 12:20 AM
You shouldn't have to do that. First, make sure that you have meta files turned on: Unity Docs and that they are committed to your repository. Then always make sure to save your scene before you commit any further changes. This will update your scene file and any prefabs that you have modified. Also, if you've changed a prefab instance but intended to changed the prefab source, make sure to hit "apply" or drag it down again before the save.
This may be worth a read too: Unity with SVN. It covers using SVN but the workflow is similar.
The meta files did the trick! Awesome, big thanks. Can't believe I've missed that part of the doc.
Answer by d9k · Feb 12, 2013 at 11:06 PM
Try this - unity docs: Using External Version Control Systems with Unity 4
Your answer
Follow this Question
Related Questions
Obfuscating DLL classes from the users 1 Answer
How to access a missing Prefabs and other assets 0 Answers
Unable to load Mono 0 Answers
onGui not getting called every frame? 2 Answers
Attached scripts as List? 1 Answer