Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Collab missing script changes

Discussion in 'Unity Collaborate' started by SudoCat, Apr 7, 2018.

  1. SudoCat

    SudoCat

    Joined:
    Feb 19, 2013
    Posts:
    26
    I'm using collaborate on a small project with a team of two. A couple of times now, when the artist has pulled down my latest set of changes, he's been greeted by a completely broken project, riddled with errors. To try and debug the problems, I downloaded the project on a different computer, and discovered that lots of my code changes weren't being recognised. Primarily, this seems to be when I've refactored code, changing folder structures and namespaces.

    It seems like Collaborate recognises that the file has moved, and successfully does that part, but then the contents of the file do not update; All the namespaces are still set to the old locations, and other snippets of code get lost. It seems like the files which haven't been moved all work fine though, and then contain references to namespaces which do not exist, resulting in a wall of red in the console.

    I've been resorting to manually copying the entire scripts folder over to my second machine after I make any changes, and then re-uploading through collaborate on the second machine. This usually causes Unity to recognise any changes it missed the first time.

    I gotta say, this is pretty damn unacceptable for a VCS. The one job of a VCS should be providing a reliable backup and history of your files; Right now, it seems like it can't even handle plain text files reliably. I dread to think what's going to happen as this project progresses. Usually, I'd prefer to use git, but Collaborate seemed like a much easier option for my less tech-savvy artist, unfortunately, it's resulting in lots of headaches for them, and now I'm starting to question if I made the right call.
     
  2. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,724
    Hi @SudoCat! I'm terrible sorry that you are running into this issue and thank you for giving Collab a try. Can I ask which version of Unity you are using? We fixed a bug very similar to this in recent versions of Unity and should be available in the latest versions of 2017.2, .3, and p2 for 2017.1. If you are using those versions and still experiencing this issue then please get in touch with our Support team here.
     
  3. athormah

    athormah

    Joined:
    Jul 31, 2013
    Posts:
    3
    Hi, my team and I are experiencing something very similar. We utilize collab and love it, but my programmer will make updates to our prefabs and when he pushes his uploads and we download them, the prefabs lose the scripts associated with the child objects within the prefab. I have to manually go and re-add the scripts to make it work. Also the collision boxes are not being updated through collab either, they are children to the prefab. So after adding the scripts back, if he makes any further changes, I pull them to my project and it does it all over again and removes the scripts. We are just updated to 2018.2.8f1 and it still happens.
     
  4. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    In my case code changes simply don't get pushed. Forgetting everything else, if collab can't push changes and both ends report they have the same content while both ends have completely different content then this thing is not really doing it's job, is it?

    My side and the server reports the projects are synced even though they clearly are NOT. This means the client deleted and downloaded the projects a couple of times and each time his new download refused to build due to all the errors in them. Each time it was because something didn't propagate from my end to the server but Unity doesn't offer me the option of doing so since it thinks "Nah, it's synced, it's okay"

    Having to send the client my changes via email completely negates the entire point of using source control, don't you think?
    I spent more time fixing broken syncs than actually working on my project(s) in some cases so where I used to recommend this to all my customers I now just default straight to Unfuddle and don't even recognise Collab's existence inside of Unity any more...
     
  5. Morphello

    Morphello

    Joined:
    Aug 1, 2015
    Posts:
    1
    I'm experiencing identical symptoms to @SudoCat. I edit file names within unity, make changes, then upload and collab wont recognise the changes. If I go into the file after a failed sync has occurred, make a 1 character change, save it and reupload, it's fine. Currently using Unity 2018.9f1, but have been experiencing this consistently during 2018.2.
     
  6. shawnblais

    shawnblais

    Joined:
    Oct 11, 2012
    Posts:
    306
    Yes this is maddening. Collab will routinely just miss script changes, telling you that you've commited everything, meanwhile another team member is seeing old code.

    Twice now I've had to manually send a .cs file and have it be copy and pasted into my co-workers machine.

    Come on guys, this has been happening for YEARS now. I remember this happening regularly in 2016 when we first used Collab, coming back 2 years later, I can't believe we're still seeing this issue.
     
    dCalle likes this.
  7. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,724
    Hi everyone! We've just released our 2018.3 beta package, which includes fixes that should address this exact issue. If you'd like to give it a try then you can check it out here.
     
  8. dCalle

    dCalle

    Joined:
    Dec 16, 2013
    Posts:
    49
    Yeah thanks, I couldn't access any files in the cloud I needed, had deleted some scripts that I thought were unnecessary then but figured I have to use them now. So the only thing I could do was push my project on collaborate and pull an old one with the script files I needed.

    wow, so now I figured getting back to the new project EVERYTHING is complete garbage. which retard gave you that freaking job? the one that figured the only thing you're capable of is comparing filenames? I'm F***ing pissed they gave you that job as a financial and existential basis for being such a freaking failure.

    Alright done, last time I pushed to gitlab because I trusted UNITY was last week. Just F***ing screw you ryan I hope the whole community has to see this post and your freaking inaptitude. MY freaking Project is in shambles. THANKS
     
    Last edited: Oct 10, 2018
    validname1 likes this.
  9. shawnblais

    shawnblais

    Joined:
    Oct 11, 2012
    Posts:
    306
    It is incredibly frustrating. I lost 4 days last week, cause we trusted that Collab was solid, after getting burned 2 yrs ago, and we got burned again. We've also moved over to GIT once again.

    I think that recommending people to upgrade to the Beta is a bit irresponsible. The Beta is extremely unstable, and with the new prefab system, it will destroy all prefabs in your project if you try to roll back to 2018.2. Very costly move for a project in development.

    To make matters worse, because the Collab interface is housed within Unity, there's no way to do a clean pull back to a specific version. You have to open up a completely broken thing, and try and revert to a previous commit, which doesn't always work.

    For Collab to be production ready there's a few things:
    * Figure out while the file differ misses files. This is such a waste of time, as I have to go through my codebase, adding "/n" to specific files, so Collab will see them. Going one by one, over Slack, with my designer, who can't compile because 7 class files just decide to go into hiding. This happened 2 yrs ago, and its still happening :(

    * You need an external interface, that is not part of the Editor. So, if I have a crashing project, or a broken scene, I can externally revert it, without opening Unity and changing the project itself. Sometimes you can't even open unity, because the scene is crashing, how do you revert to a previous commit then? It's a mess.

    * We must be able to download snapshots from previous cycles as zip files, for sanity and insurance this is an absolute must.

    I do want to say a huge thanks to Ryan who bailed us out last week and delivered a previous commit that we needed. Still, shouldn't really have to come to this, especially for a paid service.
     
    Hobodi likes this.
  10. Kyuugatsu

    Kyuugatsu

    Unity Technologies

    Joined:
    Jan 11, 2014
    Posts:
    32
    Thanks for the suggestions, @shawnblais. As you've noted, Collab is a part of the Editor -- unfortunately, this also means that we can't deliver the fixes and features that require big changes in an older version. As of 2018.3, Collab is a package, which allows us to release fixes and features in a more timely manner.

    The version of Collab you're using uses a local text file known as a 'snapshot' to compare your local state with the latest revision. This file doesn't have complete information about the state of your repository. Your local state is also computed based off of your actions within Unity (and the Asset DB), which means that in a certain case* it can go out of sync with the filesystem.

    Speaking of the certain case, that's when a file is renamed and edited at the same time. Your version of Collab is eager to avoid downloading or uploading renamed files, and it's too greedy in this regard -- if a file is both edited and renamed, along with the meta file (most IDEs will do this for you), Collab won't upload the file and yet mark it as uploaded.

    This bug is particularly egregious and thus is in the process of being backported, but Collab v1.3.x is in general more reliable (albeit there may be usability issues since it's in preview), since it uses Git rather than a single text file to keep track of your repository.
     
    Deleted User likes this.
  11. FlashyGoblin

    FlashyGoblin

    Joined:
    Apr 1, 2017
    Posts:
    23
    I'm still seeing this bug in Unity 2018.3.0f2. Other collaborators show they are all synced up, yet their scripts are not updated to the latest version in the repo.
     
  12. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,724
    Hi @FlashyGoblin! Could you tell me from the Package Manager which version of Collab-proxy you're using in 2018.3? Have you had a chance to try v1.3.x-preview yet? That version replaces the snapshot system Collab used to be based on that introduced many of those sync issues.
     
  13. RegisVe

    RegisVe

    Joined:
    Mar 2, 2018
    Posts:
    34
    Hi, I've just had the same issue in 2019.3.2f1

    I did a reload all, but with no avail.

    I'm seeing a missing script on a GameObject even though the scripts is in a folder where it should be.
     
  14. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,724
    Hi @RegisVe, I'm sorry that you're seeing a missing script on one of your GameObjects. Was this GameObject in a Scene or part of a Prefab? Was this script one that you recently added to the GameObject before publishing your changes?
     
  15. heat012191

    heat012191

    Joined:
    Apr 13, 2019
    Posts:
    1
    Hello,

    I have been running into the same issue. Some scripts I upload on my laptop do not download to my desktop computer using collab. when i create the script and save it for the first time, it compiles fine and uploads it.

    But some subsequent changes I make to the script, even though collab tells me that i'm uploading a new version of that .cs script file, it doesn't actually translate when I download it.

    I believe it has something to do with overriding a previous version of that script on the downloading computer's side. I don't believe it has to do with a prefab at all because the script file itself doesn't change.
     
  16. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,724
    Hi @heat012191, could you tell me which version of Unity and Collaborate you are using? Your script edits should overwrite your existing copies just fine as long as there are no merge conflicts. Are your scripts for ScriptableObjects or just for Prefabs? There was an issue with ScriptableObject script changes not always being imported properly from Collab that were fixed with 2019.3 with the new Asset Database.
     
  17. Hassan-Kanso

    Hassan-Kanso

    Joined:
    Jun 10, 2014
    Posts:
    8
    Hey I still have the same problem and I'm using
    Version 2019.3.2f1 Personal
     
  18. Hassan-Kanso

    Hassan-Kanso

    Joined:
    Jun 10, 2014
    Posts:
    8
    I believe this problem happened only after I forced resync using the Restore button in Collab History, but we're not sure if this is the real cause, thanks
     
unityunity