Search Unity

Svn prefabs and scenes missing scripts

Discussion in 'Editor & General Support' started by ThomasVandenberghe, Jun 20, 2014.

  1. ThomasVandenberghe

    ThomasVandenberghe

    Joined:
    Feb 28, 2014
    Posts:
    22
    Hi,

    We're currently having an issue after restructuring our project. One programmer did the whole restructuring and after everything was fine in his project, another updated. However after the update almost all prefabs and scenes are missing some scripts.
    I'm fairly sure all the scripts that are missing are subversioned as an external.

    The meta-files next to the prefabs are also checked-in, but are rarely updated, even with an update to the prefab, these aren't changed. (E.g. Prefab being at global revision 600+ while the meta file is at global revision 36).
    The script meta-files in the externals are not commited and are kept local.

    We've had this issue where not all changed to prefabs were commited, but never that scripts were missing.

    Our current project settings:
    Version Control Mode : Visible Meta Files
    Asset Serialization Mode : Force Text
    Sprite Packer Mode : Disabled

    Does anyone have any idea what could be the problem and how to solve it?
     
    Last edited: Jun 20, 2014
  2. billykater

    billykater

    Joined:
    Mar 12, 2011
    Posts:
    329
    Do you mean all the .meta files for your *.cs/*.js files are not committed in the repository? If yes don't do this. The meta file of a source file contains the id which unity uses to reference a script in a prefab.
    So if you move your source files and the id changes you get exactly the missing behaviour you are describing if another user doesn't have the up to date meta file.
    The only way to fix this is checkin all meta files you have in your asset directory.

    With text mode serialization and meta files you can even see yourself how unity stores things to figure out what needs to be committed.
     
  3. ThomasVandenberghe

    ThomasVandenberghe

    Joined:
    Feb 28, 2014
    Posts:
    22
    Thanks, that was indeed the case, so we checked in the meta files and everything was solved.