- Home /
Object referencing - metafile changes on different computers
We have been experiencing a problem with references to material files and/or other type of files in our prefabs. The problem we are seeing is that some of our meta files are being generated differently on some computers. This causes our references to become incompatible between computers. On some computers the file reference is valid, but on others the file reference becomes "Missing".
Upon further investigation, we have found that the guid value inside of the meta file is changing depending on which computer loads the material/file. And in return the guid file table does not know where to find the file on some computers, so the reference becomes lost.
Below is an example of what we are seeing. We have a mesh inside a prefab, which has a material named "1024diffuse.mat". On Computers 1, 3, and 4 the material file is valid in the mesh. On Computers 2 and 5, the material becomes "Missing" in the mesh. See below - The guid values are generated differently on computers 2 and 5.
1024diffuse.mat.meta generates the following guid's Computer 1 - guid: d49ad4de304d89b43ad89a910725f62d Computer 2 - guid: 0954102eb95badd4c9472529e21a48e2 Computer 3 - guid: d49ad4de304d89b43ad89a910725f62d Computer 4 - guid: d49ad4de304d89b43ad89a910725f62d Computer 5 - guid: 26655a54791b41e4d867fe460f5785dc
What can we do to fix this?
The most likely reason I can think of is that someone forgot to commit a .meta file when an asset (e.g. material) was originally added. If this happens then Unity will regenerate a .meta file on each computer that loads the project, but with inconsistent guid's, as you are seeing. What are you using for version control? Is everyone careful to add and commit .meta files when they create assets?
I'm not certain this is the only problem though -- we do see these sorts of issues from time to time, but it's usually the result of .meta file mismanagement.
Answer by raddman1 · Jul 12, 2013 at 03:58 PM
Commit the meta file to the repository or make sure everyone is using the same one as yoyo suggested.
We ran across a similar issue with a script on a prefab. We are using SVN for version control and a script was being copied into the unity project but accidentally placed in a directory being ignored. Everyone's machine was creating a new meta file and the script was getting a different GUID on each person's machine. Moving the script out of the ignore directory, committing the meta, and updating the prefab fixed the problem for us.
Your answer
![](https://koobas.hobune.stream/wayback/20220613070519im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Chain Texture for Line Renderer 1 Answer
Fade 2 out of 3 gameobjects on the screen who have the same material 2 Answers
How to get a List of references of instances in a static variable 1 Answer
Can you assign a material to all Items within an Empty Game Object at once? 1 Answer
Setting an object reference to null 1 Answer