Search Unity

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

Did Collab change the way it 'checks for changes'?

Discussion in 'Unity Collaborate' started by Jamez0r, Aug 18, 2020.

  1. Jamez0r

    Jamez0r

    Joined:
    Jul 29, 2019
    Posts:
    205
    Hello, I recently updated unity to 2020.1.2f1 (from an older version of 2019). I'm liking the new layout for Collab.

    However, I'm having an issue where file additions/changes aren't being recognized immediately. This has happened a couple times over the past week, but here is a specific example:
    -I added a new image.png to the project, made a sprite out of it, and made a new material for it.
    -Tested the sprite out in a scene (with the material), and then made it into a prefab for my artist to use.
    -In the Collab window, I selected all things in the list and Published.
    -My artist got the update and sync'ed Collab. He got the prefab, but when he dragged it into the scene it was 'pink' (because the Material didn't sync).
    -Ten minutes later, after working on something else, I go to publish changes on the Collab window, and the Material was in that list with the "+" icon as though it was a new file.

    Before updating to unity version 2020, all of my changes and new files seemed to be recognized immediately. Did something change with how Collab finds additions/changes? Is there a way for me to force a full-project scan for changes? This situation was especially bad because I started working on a major refactoring that was going to take me all day, so I made sure to sync on Collab before starting. And then a few minutes later I happened to notice that the material hadn't been sync'ed. If I hadn't caught it early I would have been midway through my major refactoring, and would have been stuck in the situation where I couldn't get the needed Material to my artist without syncing my partially-finished error-filled refactoring which would have rendered things useless for the artist.

    I need some way to be sure that I am fully sync'ed with Collab.

    Thanks for any help!

    Edit: I'm realizing that with the new Collab layout, I could select just the Material from the list of "Publish Changes" and sync it. That's nice and will help next time I run into a situation like this. But I really need to be sure that when Collab says "up to date" that I am actually up to date and there isn't anything pending to push. There should never be a situation like this where the Prefab got synchronized but the Material didn't. If this behavior continues its going to cause major issues

    Edit 2: A couple minutes after posting this my artist requested that I make a change on our main character's prefab. I made the change, went to the Collab window and selected only the player prefab and pushed the change. He sync'ed on his end (and we verified it was the most recent push he had downloaded) and tested it, and the Player prefab did not include the change that I had just made. We tested out a couple other things for a few minutes (thinking he might have done something weird and changed things on his end). Then I purposefully restarted Unity to force the "checking for changes" and lo and behind, the Player prefab re-appeared in my list of Publish Changes. I pushed it again, he sync'ed, and now he has the most recent version. What is going on with this delay in recognizing changes? Is it a bug or is it just how Collab works now?
     
    Last edited: Aug 18, 2020
  2. Marc-Saubion

    Marc-Saubion

    Joined:
    Jul 6, 2011
    Posts:
    653
    This might not be a problem with Collaborate.

    I have a similar issue when making changes on things like materials or animators. They work fine in the editor but sometimes, they do not appear as changed in git.

    The issue is that these "objects" are changes locally but not saved in the project folder, so git or other VCS won't see it and won't send the new data. Collaborate being integrated with unity might consider the file being "changed" but don't send anything for the same reason.

    One way to avoid this is to use "save project" every once in a while.

    Note that this bug can make you lose local changes. For example, you make changes in an animator and even though it works in Unity, as long as you haven't used "save project", your work isn't really there and if unity crashes, it's lost.
     
    Ryan-Unity likes this.
  3. Jamez0r

    Jamez0r

    Joined:
    Jul 29, 2019
    Posts:
    205
    Thanks for the reply, and yeah I've noticed some strange behavior locally with Animator not getting saved too - by habit I started doing a "save project" every time I make a change in the Animator (edit: I was not using "save project", see response below). I haven't noticed any issues locally with making changes to a Material.

    But thats definitely separate from this Collab issue. The two examples I mentioned involve a new file not being synchronized, as well as a change to a prefab (which was saved) not being synchronized.
     
    Last edited: Aug 19, 2020
  4. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @Jamez0r, I'm really glad to hear that you've been enjoying the new UI in 2020.1 so far.

    To address your concerns, the Asset Importer Pipeline, which Collab uses to detect changes within Unity, changed for 2020.1 and on. This has had an effect on how Collab, along with other VCS as mentioned by Marc, detects changes. That said, there should be no confusion about what changes are being picked up by Collab and which aren't. If it's listed in the list of changes then you should feel confident that every change related to them will be published too. I'll look into opening a bug for it so that we can aim to address this inconsistency.

    In the meantime, continue using "Save Project" before publishing any changes to help ensure that any edits you've made have been saved locally so that they can be picked up by Collab and any other VCS you choose to use.
     
  5. Jamez0r

    Jamez0r

    Joined:
    Jul 29, 2019
    Posts:
    205
    Hey Ryan, thanks for the reply and the info!

    I just realized that "Save Project" is not the same thing as a simple "Save...". I was just pressing Ctrl+S, and wasn't ever using Save Project. I'll give that a try, and start to get into the habit of doing a "Save Project" before pushing to Collab. If I still have issues, I'll reply to this post. Thanks!
     
    Ryan-Unity likes this.
  6. Jamez0r

    Jamez0r

    Joined:
    Jul 29, 2019
    Posts:
    205
    @ryanc-unity Hey Ryan, I just duplicated one of my scenes and moved it into a folder for my artist to work on.

    I pushed to my changes to Collab, and my artist downloaded the changes and the new scene hadn't gotten synchronized. I then did "Save Project", and it still didn't appear as a new file/change in the collab "Publish Changes" section.

    I then restarted Unity, and it showed in the Publish Changes section. I really need a way for these changes to be automatically found without me restarting Unity.

    Is there anything I can do or change on my side?

    Thanks for any help!
     
  7. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @Jamez0r, that's really frustrating, I'm sorry to hear that. When you duplicated your scene, did it get picked up by the Collab Toolbar? That should happen automatically. You can verify if it did by looking through the Collab History window, expanding the Asset Changes dropdown and finding the .scene file that you created.

    I tried to reproduce what you ran into using the HDRP template project but didn't have any luck using Collab v1.3.8 and Unity 2020.1.2f1. Would you be willing to send me a small project that reproduces the issue you're seeing?
     
  8. Jamez0r

    Jamez0r

    Joined:
    Jul 29, 2019
    Posts:
    205
    Hey Ryan, thanks for the response!

    The Scene that I duplicated only got picked up in the Collab Toolbar after I had restarted Unity. Before restarting Unity, I had also tried doing "Save Project", which didn't pick it up.

    I'll try to make a test project this weekend and see if we can get the issue to happen on it. Thanks for your help!
     
    Ryan-Unity likes this.