Serialized mesh reference is lost when transfered to another computer

Hi there!

We run into an issue with mesh reference. We have various characters with a same base FBX, but with different personalization attributes (such as hair and default clothes). The personalization is made within characters’ prefabs. I use public field to let Unity serialize the reference (public GameObject Hair;), and then we just drop the mesh to the field. It looks like this:

This is fine

It also works in-game, and the reference is retained when Unity is closed or computer (Windows) rebooted.

But as soon as we transfer the data (via Git) to another computer (Mac), the reference is lost:

alt text

This happens consistently. If we edit the prefab on level-designer’s Mac, it works for him, and it works in exported apps, but as soon as I download his commit, it’s lost again. Do you have any idea what are we doing wrong?

Thank you!

You need to commit meta files as well. To turn on meta files go to Edit -> Project Settings -> Editor. Change Version Control Mode to “Visible Meta Files”. This will give you a meta file for every file in your assets folder. These meta files are how unity maintains connections between assets.

http://docs.unity3d.com/Manual/ExternalVersionControlSystemSupport.html

As a side note, do not under any circumstance commit anything in the Library folder.

make a prefab of your object where your hair serialized field is on.
Generally make a prefab for every object also when its parent object is a prefab, fixed problem in my case