Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Collab didn't update file contet with file rename

Discussion in 'Unity Collaborate' started by leizzer, Aug 8, 2018.

  1. leizzer

    leizzer

    Joined:
    Jun 26, 2013
    Posts:
    39
    [Disclamer: I don't know if there is an issue tracker for Collab, and I hope someone from Unity fill a ticket for this]

    I was converting my files from Unityscript to C#

    I used https://github.com/Unity-Technologies/unityscript2csharp as a base, then I modified some of them that didn't work out of the box.

    I did that like 2 months ago, I pushed all the changes and continue working locally. In my machine all the files were OK, in C#.

    Today a friend tried to pull my project and all the .cs files contain Unityscript instead of C#

    I still had all the files in good shape locally, but at some point trying to figure out what was going on I did a revert to a previous commit... and surprisingly all .cs files now have Unityscript inside instead of C# and I have no way to recover those changes.

    This is really horrible, why in hell Unity pull from the cloud if I was reverting locally? Why was I able to keep working locally seeing all in C# and Collab didn't noticed it?

    This is really a low punch, I had to change lot of things to make the project work in C# and today I'm almost back to squere one.

    Please review the code from unityscript2csharp as a clue for what went wrong.

    For now I'll go back to Git and don't trust Collab... I can't recommend a VC that in fact, make the things worse.

    It seems to happen when the file change content and name at the same time, for the little information I can see on Collab Time (fragment):

    Code (CSharp):
    1.  
    2. /Assets/Scripts/environment/
    3.  
    4.     renamed AnchorPoint.cs
    5.     renamed AnchorPoint.cs.meta
    6.     added AnchorPoint.js.old
    7.     added AnchorPoint.js.old.meta
     
  2. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    163
    Hi. I am the author of unityscript2csharp tool.

    I've talked with Collab developers and have been told that this is a known (unrelated to unityscript2csharp) issue and they will follow up as soon as they get more information (AFAIK they are investigating it)

    Adriano
     
  3. ollieblanks

    ollieblanks

    Unity Technologies

    Joined:
    Aug 21, 2017
    Posts:
    111
    Hi @leizzer,
    Thank you for reporting this issue.
    I can confirm that this is a recently known issue to the Collaborate development team and is of the highest priority to resolve. As mentioned by @AdrianoVerona_Unity this is unrelated to unityscript2csharp and caused by renaming and editing files external to the Editor in a very particular way causing Collaborate to lose track of the changes.

    Unfortunately, reverting back to a previous version will have lost your local copy of the correct files. I give you my apologies for your loss of work and give you my word that I will chase resolution of this bug constantly until it is fixed.

    If others do experience this issue and believe that their changes are not being picked up by other clients, please make a backup of your work and do the following:
    1. On the workstation with the assets whose changes don’t seem to be syncing across other clients, close Unity
    2. In your Project, navigate to the Library/Collab/ folder within the Project and delete the CollabSnapshot file
    3. Reopen Unity and your Project. This will regenerate your snapshot file and display any missing changes in the Collab Toolbar
    4. Publish these changes
     
  4. leizzer

    leizzer

    Joined:
    Jun 26, 2013
    Posts:
    39
    Thank you guys.

    It's good to know that Collab is going forward because it's a well needed feature.

    Cheers
     
    ollieblanks likes this.
  5. Cleverlie

    Cleverlie

    Joined:
    Dec 23, 2013
    Posts:
    138
    I had pretty much the same problem, I changed the name of some scripts (changed the name of the class, thus forcing me to change the name of the script file in order for it to compile properly), commited everything fine, then after 3 weeks some members of the team report they cannot compile a fresh download of the project from Collab because of compiler errors, when I check the problem, the scripts that I changed name had the same content inside than before (meaning that the class name was reverted back to all the previous version), I cannot commit the change in my side because Collab doesn't seem to recognize any changes, but I have totally different content than the master branch of collab.

    this kind of problems seriously can't happen, people can loose months of work, Collab can't be tagged as a final release with these kind of work breaking bugs going on, put it back on beta or alpha please so people don't get misleaded into using a system that can harm companies into potentially thousands of dollars worth of man hours.

    Collab should do some MD5 comparison of files instead of whatever it is doing now that can't recognize simple file binary diffs between local and server...
     
  6. leizzer

    leizzer

    Joined:
    Jun 26, 2013
    Posts:
    39
    This ruinned my project that I have been struggle to keep alive.

    The entire project now has the script reference broken in the inspector broken.
    How a tool that is for versioning can do something like this on production?
     

    Attached Files: