Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

Major collab hiccup on syncing files

Discussion in 'Unity Collaborate' started by Cicaeda, Jun 3, 2018.

  1. Cicaeda


    Sep 29, 2017
    I pushed an update to my team's project where I:

    Deleted the root folder of a store asset I was no longer using
    Renamed an inherited class
    Modified and renamed older file names and class names
    Added a couple new scripts I wrote
    Recreated a few scripts with the same name
    Added multiple new .asmdef Assembly Definitions to store assets separate from the code I was working on

    I pushed these changes in one batch. My teammate pulled it, but had a few compiler errors because I pushed without checking for compile errors on the other platform we target. I switched platform, fixed the errors, pushed again. He pulled again. Everything was fixed, yippee. He was all up to date, so then he pushed his new code (completely separate from what I was working on). I pulled it, and went back to work on my stuff, and noticed that more than half the code I wrote disappeared. And even more interestingly, the folder with the asset I deleted was back, with collab reporting that my teammate had added it to the project. I thought to myself, no problem, I'll just roll back and port my code over, no big deal. Well, I rolled back, and the code either wasn't there or wasn't updated. I lost about an hour's work.

    I checked the push history in dashboard. It recorded everything I pushed, including the deletion of that entire folder. Yet somehow it wasn't propagated to my teammate when he pulled, along with half my other changes.

    It seems that most of the work I lost was from scripts I modified, rather than added.

    Another thing I noticed was that one small class I created with almost nothing in it, had a mismatching class name from its file name. It was one of the files I had changed file name of, but I'm not sure if the error was me, or a symptom of collab. If it was me, surely something so small couldn't mess up half of the push?

    Did we do something wrong, or is this a major bug?

    I'm kind of afraid to push changes again without backing up every time.
  2. ryanc-unity


    Unity Technologies

    Mar 23, 2016
    Hi @Cicaeda! Thank you for going into such detail about the issue that you ran into. On the dashboard website, could you try going to the Assets tab and navigating to the scripts you modified to see if they have their full history? Can you try downloading a version of that file from your earlier commits to see if they have the changes that are missing?
  3. Cicaeda


    Sep 29, 2017
    Just looking at one script as an example right before stuff went missing, I simultaneously edited code, and moved it to a subfolder. I might've deleted and recreated it, and changed the name of the class it inherited from. Either way, this particular script was listed as "Moved" in the timeline, however, there is no file history in the assets tab from before the move. The main problem, all the continued file history only contains the empty unimplemented class from before, with my new code nowhere to be found. Maybe there was human error in this part, I'm open to the possibility. I probably messed with file structure too much or something. But... I was expecting the code I wrote to be at least somewhere if I went digging in the history. It's not that big of a deal if it just happens this one time, but I figured I should report it anyway.
  4. yackson-cc


    May 14, 2016
    Same problem with my collab, some files and references in the scene are unlinked, or some prefab return to previous version, this happend in two working stations at my company.
    Last edited: Jun 22, 2018