Search Unity

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

[Solved] Renaming classes with Collab

Discussion in 'Unity Collaborate' started by FeastSC2, Aug 23, 2017.

  1. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    978
    Every time I rename any class (in scripts) my collab mates do not receive the new class in Collab, so theirs keep the old name and the old code while mine stays renamed.

    Is there a way to fix this?

    Right now, every time a class has been renamed, I must manually send them all my scripts. And they must remove all theirs. I am using Visual Studio and Resharper to rename my classes!
     
  2. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi again @FeastSC2!

    I'm sorry you're running into this issue. This is a known bug that we just finished testing a fix for and is going through the back port process to make its way to a patch for 2017.1. We found that smart IDEs, like Visual Studio, when refactoring a script would also try to rename the associated .meta file. Unity normally handles renaming the .meta file when an asset gets renamed outside of the Editor. That way Collab could pick up on that rename, allowing it to also track changes in the asset instead of just its rename. We updated Collab to be able to detect both edits and renames when an IDE refactors a script.

    Until our fix gets back ported, a good workaround is that after refactoring your script, go into your project's Library/Collab folder, delete your snapshot file, then re-open Unity. Collab will then detect both the rename and edit, allowing you to push both. I'm sorry again about the inconvenience.
     
    FeastSC2 likes this.
  3. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    978
    Cool ryan, good to see you're working hard on fixing those bugs! ;)
    I'll use that useful trick meanwhile then, don't sweat it.
     
    Ryan-Unity likes this.
  4. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    978
    Hey Ryan, I'm not certain about updates with Unity (Is it due for 2017.2?), how exactly will I know when your fix has been gone through, is it something automatically done?
     
  5. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Sorry for the confusion. When it comes to bug fixes, we make sure that they make it into the latest version first (in our case, 2017.3), then we back port it to the next version (2017.2) and (if the bug is a very high user pain issue) then to 2017.1.

    When new patches are released for these versions, the fix will be listed in the Release Notes. The fix is still in the middle of the back port process, however, so it may not make it into the next patch for 2017.1 and .2.
     
    FeastSC2 likes this.
  6. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    978
    I get lots of problems syncing between our team.
    What is the procedure we can follow every time we want to use collab to make sure it's doing its work correctly?
     
  7. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    If you're still running into issues then try looking over our Collab Expert Guide! It has lots of tips on how to best utilize Collab and avoid running into sync issues.

    If you're still running into issues after going over this doc then would you mind going into more detail about what changes seem to not be syncing for you and your team?
     
    Last edited: Jan 10, 2018
  8. Flag74

    Flag74

    Joined:
    May 31, 2017
    Posts:
    128
    page not found...
    btw, still having rename issues (2017.2.0p2)
    is it fixed now ?if yes, in which version?
     
    Last edited: Jan 10, 2018
  9. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @Flag74! Sorry about the Collab Guide returning a 404. Turns out the link had been moved so I went and updated the link. You can find the guid here.

    As for the rename issue, the fix made it into 2017.2.0f3 so you should still have it in 2017.2.0p2. Which code editor are you using to rename/refactor your code? What OS are you on?
     
  10. Flag74

    Flag74

    Joined:
    May 31, 2017
    Posts:
    128
    hi!
    Win7, VS2017

    I can't believe qa team is not able to reproduce this annoyng bug, cause it happens almost always.
    Every commit I do where I rename something, forces me to send the modified assets in a zip file to another collaborate member. Once this member replace the files, collaborate sees the changes and he is able to commit them, fixing the issue for the rest of the team.

    Just yesterday I renamed the class and the filename of a scriptable object and I had to send the files manually to another collaborate member...
     
  11. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    @Flag74 thank you for the extra info. Can I recommend that you open up a support ticket so that one of our support engineers can help you get sorted out? You can do so from the Collaborate section of the Developer Dashboard, under Support.
     
  12. Flag74

    Flag74

    Joined:
    May 31, 2017
    Posts:
    128
    there'snt any Support option lol
     
  13. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Really? Could you share with me a screenshot of what you see when you expand the Collaborate section of the menu on the Developer Dashboard?
     
  14. tsny

    tsny

    Joined:
    Jan 27, 2018
    Posts:
    2
    I have recently encountered the bug on Windows 10, VS2017 as well. Renaming a class sometimes before renaming the filename can cause this for me. The workaround still works.
     
  15. luislodosm

    luislodosm

    Joined:
    Apr 26, 2016
    Posts:
    26
    Unity 2018.2.0f2. Mac. Renaming a class in Visual Studio doesn't trigger change in Collaborate.
     
  16. ollieblanks

    ollieblanks

    Unity Technologies

    Joined:
    Aug 21, 2017
    Posts:
    460
    We have now been able to reproduce this behaviour and it has been logged for a fix.

    As a workaround, please refactor the class to a temporary name, without any other changes made by other users commit the change, and then refactor it back to your desired class name and commit again.