Search Unity

Resolved Collaborate on the same graph

Discussion in 'Visual Scripting' started by Maskedchamo, Aug 17, 2021.

  1. Maskedchamo

    Maskedchamo

    Joined:
    Mar 12, 2018
    Posts:
    23
    Hi,

    Just wondering what the best practice is for the following situation:

    We're a team of 2, and we collaborate with plasticSCM. I am about to add a new group in a script machine graph to a prefab. My partner may be working on the same prefab at the same time, possibly modifying existing groups in the same graph. He won't work on the group I am about to add.

    What's best?
    • Work on the same prefab and graph as long as we don't modify each others groups? Is this going to merge well with plasticSCM?
    • Duplicate the prefab on my end, do my changes, then copy/paste into the shared prefab at a time my partner won't modify it?
    • Use the plasticSCM "lock and checkout" functionality on the prefab script to ensure only one of us modify it at any given time?
    • Any other possibility?
    Thanks in advance.
     
  2. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,076
    I don't think many people in the community have tried merging graphs. Especially with PlasticSCM. Option three of Locking the file while you're working on it would be what I'd go for by default.

    That said, Plastic is much better than git for stuff like this so it could be worth a test to see what happens when there's a conflict. Technically a graph is a JSON file more or less and it can be manually merged. It's just hard to read and parse without losing a lot of time.

    I know this is something on Unity's roadmap, however. Diffing the graphs should be possible in the future.
     
  3. Maskedchamo

    Maskedchamo

    Joined:
    Mar 12, 2018
    Posts:
    23
    Thanks for the advice. We'll run some tests to see how good plastic performs on merging.

    Good to know graphs are just JSON files.
     
  4. ericb_unity

    ericb_unity

    Unity Technologies

    Joined:
    Nov 24, 2017
    Posts:
    167
    I would strongly suggest to avoid working on the same graph as somebody else, Merging is almost impossible to do for humans with he current serialization, all the graph data is on a single line of text.

    If you can lock graph assets your are working on. Do it, it will save you a lot of troubles until we get a better save format.
     
  5. Maskedchamo

    Maskedchamo

    Joined:
    Mar 12, 2018
    Posts:
    23
    Thanks for the advice Eric. We'll lock the graphs as you suggested. Much appreciated.