Search Unity

Unity's version control component has been upgraded to Plastic SCM.

[Solved] Incorrect sync when renaming scripts [2017.1.2f1]

Discussion in 'Unity Collaborate' started by Chuptys, Nov 7, 2017.

  1. Chuptys

    Chuptys

    Joined:
    Mar 19, 2014
    Posts:
    18
    Collaborate fails to correctly synchronize scripts when they get renamed and changed 'at the same time'.

    What happened:
    1) I made some changes to 'MyScript.cs' (a script file that was already in collaborate, so no new file).
    2) Then I refactored 'MyScript.cs' to 'ABetterName.cs'.
    3) I publish 'ABetterName.cs'.
    4) My teammate fetches the changes and sees 'MyScript.cs' has been renamed to 'ABetterName.cs', but the contents of the file remain unmodified (so the changes of step 1 were not synced).

    In the collaborate dashboard I can see a 'rename' update to the script file.

    How I eventually solved it:
    Subsequent changes to the script caused collaborate to correctly update the contents of the script.
     
  2. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @Chuptys! I'm really sorry you've been running into this issue. We put a fix for this bug in 2017.1.1p2. Would you be willing to give that version a try to see if you're still encountering this bug?
     
  3. Chuptys

    Chuptys

    Joined:
    Mar 19, 2014
    Posts:
    18
    Hello @ryanc-unity. Thanks for your reply!
    I'll try the patch and see if we come across this bug again (for now it seems fine...).
     
    Ryan-Unity likes this.
  4. nogaskater

    nogaskater

    Joined:
    Apr 25, 2015
    Posts:
    5
    Hi, I also ran into this issue. I renamed a script and made some changes to the code and code changes won't sync on the cloud. The script also inherits from another class (I mention this because I have seen another post with same sync problem without renaming, but they had this issue with a inherited class script).

    EDIT: Sorry i forgot to mention, I'm using 2017.2.1 version.
     
  5. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @nogaskater! I'm sorry you're running into this issue. Can you further specify if you're using Unity 2017.2.1 or 2017.2.1p2? We were only able to get the fix into the latest patch for 2017.2 so it could be that you only need to update to the latest patch version.
     
  6. nogaskater

    nogaskater

    Joined:
    Apr 25, 2015
    Posts:
    5
    My current version is 2017.2.1f1 (default installation). Is p2 a newer version? If so, where can i dowload it?
     
  7. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    @nogaskater Sorry, I made a mistake earlier about which version this fix was in. I was thinking of 2017.1.1p2. You should have the fix in the latest version of 2017.2. Are you using Visual Studio, MonoDevelop or a different IDE to refactor your code?

    Here's where you can get Unity patches: https://unity3d.com/unity/qa/patch-releases?version=2017.1
     
  8. nogaskater

    nogaskater

    Joined:
    Apr 25, 2015
    Posts:
    5
    I'm currently using Visual Studio 2015. I downloaded 2017.1.2p4 (updated 11 December) and seems to be syncing correctly when I modify the name and content of a script, so I'll stick to that version for now I guess.
     
  9. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Thanks for double checking that version! I'll make a note to investigate whether 2017.2.1f1 has the fix or not. It's possible that during the back port process to the various versions of Unity that one of the patches dot releases was accidentally skipped. Thank you for bringing that to our attention and let us know if you run into any more issues!