- Home /
Perforce Version Control
I have been using Perforce for version control for a couple of years now without difficulty. However, recently I have run into a problem where my project's game objects will lose their components when getting the latest build on a different workspace. Items affected are textures, scripts, and audio files assigned in the inspector. The files are present in the project, but will need to be reassigned along with any inspector variables. Prefabs in the hierarchy will appear red and will need to be replaced.
I am using Unity 4.5.4 The Version Control is set to Perforce and the Asset Serialization is set to text. I have tried Mixed and Binary also. An error that appears at times but not every time indicates a problem with the meta files. For example: Assets/Scenes/Connection.unity.meta - file(s) not on client.
I am in contact with Perforce and they don't understand how Unity interacts with Perforce. Please advise.
I found this: Anyone who has been using Unity for very long has encountered the dreaded “Referenced script on this Behaviour is missing” problem, which typically occurs either when you have a Component on one of your objects whose script has been deleted or you have moved a scene from one project to another and even though they both have the appropriate scripts, the serialized reference to the script is no longer valid.
Which leads me to believe that the meta file is being edited or corrupted under version control. Anyone else having this issue?
Answer by triff · Oct 22, 2014 at 06:50 AM
Eyup,
Set the Version Control Mode to Visible Meta Files instead of Perforce (bear with me...) and Asset Serialisation to Force Text, that should do it.
The other things to remember are to not check in the Library or Temp folders as these should only exist locally. Then, anything you do (move/delete/check in/out) to a file, you also do to the metafile.
I had issues a few months back with P4EXP (installed by default with P4) and Unity, so had to manually prune that from my system - if you do the above and things are still wonky, maybe give that a shot.
Good luck!
Eyrup,
Thank you for your response. I will try as you suggested, but I would like to hear from others theories why this might be happening with the upgrade to 4.5.4 from 4.3.2..
Eyrup,
I've tested your suggestion. It doesn't allow me to input my server or credentials. This does not seem like an option for me at this time.