Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
Unity's version control component has been upgraded to Plastic SCM.

Collab won't publish Visual studio/resharper refactorings

Discussion in 'Unity Collaborate' started by Alverik, Nov 30, 2016.

  1. Alverik

    Alverik

    Joined:
    Apr 15, 2016
    Posts:
    417
    Ok, I'm here to report that we've been having this really annoying issue. For some reason Collab sometimes won't publish changes made by Visual studio or Resharper's refactoring tools. We've been having to rename some classes and other variables, but the issue mostly happens for Class names. Usually just the new file name is detected and published by Collab, but when other team members receive the update they start getting a namespace name missing/missing directive exception, and if you open the file, the class name is the same as it was in the revision before the refactoring occurred. I've no idea why this happens, but it's really annoying and hinders development... has anyone else seen this issue? anyone knows why it could be happening or a way to fix the problem?

    Anyway, any advice would be appreciated.

    PS: We are using Unity 5.4.1f1
     
    Last edited: Dec 1, 2016
  2. holliebuckets

    holliebuckets

    Moderator

    Joined:
    Oct 23, 2014
    Posts:
    496
    @Alverik this is a recurring issue we seem to be having and i can't seem to reproduce it on my local machine or projects. i can empathize that its more frustrating for you than it is for me not being able to track this down. So I have a few very specific questions if you are willing to work with me on this.

    Can you please edit a single script using VS or Resharper and have a namespace change?

    When changes/namespace changes are made, do you see the script recompile-er (mono) wheel run in Unity?
    It will be the little grey wheel in the bottom right corner. The only thing I can think of, is that the new namespace isn't recompiled before and "seen" by collab before you Publish your changes.

    Is the script you edited in the list of changes to Publish?

    After a Publish, do you see the namespace changes in the script file if you download it from the Collaborate web dashboard?
    To get to your web dashboard, from the Services window select "Go To Dashboard", select "Go To Collaborate", select the Assets tab, select the Assets folder, and find the script you just pushed. Download the most recent version of that file. Does it have the changes?

    The user that pulls the changes, please have them launch Unity with the command line argument
    -enableCollabEventLogs and then Update the project. (How to here) If the namespace changes don't appear, please submit a bug and ping me the case #.

    If there is a specific machine or a specific teammate that seems to have this happen more than others, can you try it with that machine/teammate?

    Thank you so very much. This is not a fun experience and I'm working hard to make it better and prevent this from happening to other users as well.
     
  3. Alverik

    Alverik

    Joined:
    Apr 15, 2016
    Posts:
    417
    I'm away from my PC right now, so I'll have to do proper testing later, but I can answer more or less from my previous experiences in the meantime (I've personally seen it happen like 4 or 5 times already).

    Yes, I always see the recompile symbol, but I must admit once or twice I've hit the publish button before compiling was finished. Yet I've always made sure that the file appeared in the list of changes before hitting publish. Still, most of the time I do wait for compiling to finish, so I'm not sure it can explain every time the error has happened (I'll try to be extra careful from now on though).

    Like I mentioned the file name changes properly in the new revision but not the class name... Also, only updating or restoring PCs get affected by the error, if I don't restore the project on my side I never get the issue myself, just those who have updated to that revision. I've only personally seen the error on my side once, when I changed a prefab by mistake so I restored to the latest revision, and boom, got the error and had to request a teammate to send me the whole folder with the code base. The strange part is that, that time, my teammate got the update properly, but when I restored I didn't. Most of the time he is the one getting the error, but that time it worked fine on his end, but not mine...

    Anyway I'll try your other recommendations as soon as I can and let you know, but we are on crunch time, I'll have to talk to my teammates, but I'm not so sure they'll be thrilled to cause errors on purpose right now... still I'll let my teammates know to turn on the event logs and also will check the web dashboard.
     
    holliebuckets likes this.
  4. holliebuckets

    holliebuckets

    Moderator

    Joined:
    Oct 23, 2014
    Posts:
    496
    Ya, I if you are late in development, no worries. I don't want to cause more issues than you already have. If you happen to be able to repro with a test project, let me know :)

    Thank you for being so open and reporting the issue though. This one is a nightmare.
     
    Alverik likes this.
  5. holliebuckets

    holliebuckets

    Moderator

    Joined:
    Oct 23, 2014
    Posts:
    496
  6. Alverik

    Alverik

    Joined:
    Apr 15, 2016
    Posts:
    417
    Nope, sorry, not that I can see, though, hey, thanks for reminding me of that! lol. I do want to move some of my scripts into a Plugins folder and had totally forgotten about it. So, thanks, hehe