- Home /
Behaviour is missing when using project on different computer.
Hello,
I've created a new project and uploaded it to my source control system (git). When I downloaded the project on a different computer, I received the error: "The referenced script on this Behaviour is missing!" for each one of the assets on my prototype.
Basically, all of them are missing the reference to their respective scripts.
I'm suspecting that this error is related to the files I configured to be ignored by the git. But I'm not sure what file should be un-ignored to avoid the problem. Has anybody experienced this issue before?
Here is my gitignore file:
#Ignored folders
Temp/*
Library/*
Build/*
#Un-ignore these specific files
!Library/*.asset
!Library/AssetImportState
!Library/AssetVersioning.db
!Library/BuildPlayer.prefs
!Library/ScriptMapper
!Library/assetservercachev3
!Library/expandedItems
!Library/guidmapper
!Library/unity default resources
!Library/unity editor resources
#ignored files.
*.pidb
*.userprefs
Thank you
Answer by doug__ · Oct 05, 2014 at 07:36 AM
I know this is a somewhat old question, but the answer is that you're ignoring .meta files somehow.
Every .meta file assigns a GUID to a script in unity, and if you delete the .meta files it generates a new GUID; script mapping is done via GUID, not path, so you get:
The referenced script on this Behaviour is missing!
...and yes indeed, for reusing code with different projects this is very annoying.