2
\$\begingroup\$

I'm working in a team of three people on a 2D game, and Unity recently has been messing up the fileID on many sprites:

-  m_Sprite: {fileID: 21300000, guid: 6186fa4d068aae8418d9520f658d1ee6, type: 3}
+  m_Sprite: {fileID: 21300002, guid: 6186fa4d068aae8418d9520f658d1ee6, type: 3}

The guid stays the same, but the fileID changes, and the sprite goes missing. If one member fixes it, it becomes broken for one or both the others.

What can we do to fix that?

"reimport" didn't work. Prefabbing them didn't work. Deleting the whole project and re-downloading it didn't work either.

We are using 4.6.0f3, and before that we were using 4.6.0b17 IIRC. "Force Text" is already selected.

Here's .gitignore:

Build/
Design/

# project trashable
obj
Temp
*.tmproj
*.csproj
*.unityproj
*.sln
*.suo
*.user
*.pidb
*.userprefs
*.link
*.pyc

# library trashable
Library/cache/*
Library/shadercache/*
Library/metadata/*
Library/previews/*
Library/ScriptAssemblies/*
Library/*.log
Library/ShaderCache.db
Library/ShaderCache
Library/shadercompiler-1.log

# various
AnnotationManager
AssetImportState
AssetServerCacheV3
AssetVersioning.db
AudioManager.asset
BuildPlayer.prefs
BuildSettings.asset
CurrentLayout.dwlt
CurrentMaximizeLayout.dwlt
DynamicsManager.asset
EditorUserBuildSettings.asset
FailedAssetImports.txt
InspectorExpandedItems.asset
MonoManager.asset
NetworkManager.asset
ScriptMapper
assetDatabase3
assetservercachev3
expandedItems
guidmapper
CurrentMaximizeLayout.dwlt

I've just noticed I also have a global gitignore, which the others might not have:

*~
.DS_Store

I'm wondering if such a thing mess up the fileIDs? I.e. if someone has a DS_Store file and someone else does not, can this be a problem?

(btw what's the point of fileIDs, if there already are guids? Doesn't they defeat the purpose of having guids in the first place?)

\$\endgroup\$
2
  • \$\begingroup\$ This can also be prefab related. Are you using prefabs in a special way? are you storing those and their meta files properly in the versioning tool? \$\endgroup\$
    – aggsol
    Dec 2, 2014 at 8:14
  • \$\begingroup\$ @CodeClown actually we weren't even using prefabs so far, we were just putting the sprites in the scene. And prefabbing them didn't help. Their metas are stored, as the guid actually works. \$\endgroup\$
    – o0'.
    Dec 2, 2014 at 8:46

2 Answers 2

1
\$\begingroup\$

I imagine you got this problem after a merge. You can rollback to when everything was correct, find who is the origin of the problem, and maybe find why it occured.

In any cases I think you will have to ask your team member to force update / pull the latest version.

Probably not related but remember to always set Asset Serialization to "Force Text" and Version Control to "Visible Meta Files" in Edit > Project Settings > Editor.

\$\endgroup\$
5
  • \$\begingroup\$ We already had one member delete the whole project and redownload it from git, and it didn't help. It already is Force Text. \$\endgroup\$
    – o0'.
    Dec 2, 2014 at 8:44
  • \$\begingroup\$ You only have Assets and ProjectSettings in your git repository, right? \$\endgroup\$
    – lvictorino
    Dec 2, 2014 at 9:11
  • \$\begingroup\$ I've edited, posting my .gitignore. \$\endgroup\$
    – o0'.
    Dec 2, 2014 at 9:27
  • \$\begingroup\$ Why don't you ignore Library folder at all? Try removing it from your project folder and restart Unity. (not sure this is related) \$\endgroup\$
    – lvictorino
    Dec 2, 2014 at 9:51
  • \$\begingroup\$ The only two Library/ files in the project are EditorUserSettings.asset and ProjectSettings.asset. I'm not sure if they can be related to this. \$\endgroup\$
    – o0'.
    Dec 2, 2014 at 10:18
0
\$\begingroup\$

In order to get rid of this, we had everyone delete and re-download the project from git. Only then the problem disappeared.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .