Search Unity

Unity + Perforce trouble

Discussion in 'Editor & General Support' started by sl4ppy, Mar 23, 2010.

  1. sl4ppy

    sl4ppy

    Joined:
    Mar 23, 2010
    Posts:
    12
    I'm trying to understand how to get Unity working within Perforce so that our team of 15 can work concurrently on the same project.

    Unfortunately there seems to be very little information, but I did stumble upon this video that is fairly helpful.

    http://www.screentoaster.com/watch/stWU9RRUxIR19cQ15bXlpcXlNV/perforce_unity

    I've successfully set everything up according to the video. However, when another user syncs and opens the project from Perforce, the scene data is not correct.

    For example, my test project scene has a terrain object, camera, directional light, animated character, and all the scripts needed to have the character run around on the terrain. When another user opens the project and scene, the terrain is completely missing and the character data is present but the visual (mesh) is missing. Also, none of the scripts-object connections are maintained...

    If anyone can provide some insight, I'd be greatly appreciative...
     
  2. The-IT664

    The-IT664

    Joined:
    Jul 28, 2009
    Posts:
    29
    Hi Slappy,

    I don't have any experience with Perforce, however we use Unity's propriety asset management software "Asset Manager". I'm fairly confident that there is no way of merging scenes, using Asset Manager or otherwise. This leads to one of two situations:

    1. If someone needs to modify a scene, the person requests a 'key' on the scene if no one else currently holds it. Only the person with the 'key' is allowed to modify the scene on the server. Once the person has completed the changes to the scene on his computer, he simply commits his modified scene and releases the 'key' for someone else to use.

    This solution is good for small teams or situations where few changes to the scene are made.

    2. You split the entire scene into multiple prefabs and effectively recreate situation 1. but with 'keys' on individual prefabs.

    This solution is better than 1. and we have found it to be sufficient for the most part, however I cant stress enough how much we have moved away from using the Unity3D editor for positioning and linking objects in a scene. Instead we try to link, generate and position as much as we can through code.

    As for the key, if necessary you could write it up on your local white board with the name of the person currently holding the key.

    Anyway, I hope this has clarified the situation for you any anyone else confused about the scene merging issue.

    All the best with your projects!

    Nic

    Edit: I almost forgot, make sure you reload the scene whenever you update from the server otherwise Unity will locally store the previous version. Usually restarting the editor or reloading the scene will fix the problem (make sure you say NO when it asks if you want to save your changes).