Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Plastic not actually downloading all of my project (or something - I don't really understand)

Discussion in 'Unity Version Control' started by Clonkex, Apr 19, 2022.

  1. Clonkex

    Clonkex

    Joined:
    Jul 31, 2012
    Posts:
    31
    All along I assumed Plastic would be a great addition. I only hadn't upgraded because Collaborate worked fine and I had no reason to. Recently Unity forced me to migrate, and I thought it would be fine. NOPE. What a pain. Somehow it's so much worse than Collab. Collab often bugged out after hibernating and I had to restart the editor, but that's nothing compared to Plastic.

    Look, I'm a relatively experienced programmer. I've used Mercurial for about 6 years now at work and never had an issue with it, yet somehow I can't seem to figure out what Plastic is doing.

    All seemed like it was working all right. I was able to commit/push changes without problems. Then I decided to mess around with ECS 0.50 and installed the package. Shortly after doing so I realised the hybrid renderer isn't compatible with the built-in renderer and removed the package. It left appeared to leave some cruft behind so I thought no big deal, I'll just revert. Ummmmm.... well ok, there's no revert option in the Plastic integration. Wtf. Fine, it's pretty crappy that the Plastic integration went backwards from Collab but whatever, I'll just learn to use the Plastic SCM client program. Sigh, there doesn't appear to even be a button to open the external client from within Unity. WHATEVER. After a couple of minutes of exploration I found how to revert changes in the Plastic client. I reverted and then restarted Unity to make sure it loaded the reverted changes.

    I got some errors that hadn't been there before and Plastic showed boot.config as changed even though it also reported that the file was identical in the diff view (at this point I'm thinking wtf is this crappy source control software). I then thought ok, that's weird, maybe there's some folder or file that isn't source-controlled that didn't get reverted, so I deleted the entire project folder and re-downloaded through Hub.

    What do you know, now I have way more errors and Plastic is showing some files as deleted and some as added. You have got to be f*cking kidding me, Unity. What is this garbage??? I don't understand how you can still be releasing such incomplete, broken software as production-ready. It's insane. And not only that, but Unity's greatest strength is how beginner-friendly it is, so you go and replace the beginner-friendly Collab with a much more complex 3rd-party solution that doesn't even work properly (this complaint is part of a general sense of Unity having no clue about who its users actually are - or at least, not realising that the only reason it's so popular is because beginners like it, not because enterprise users are enamoured by its unreliability and janky, unfinished "production-ready" features).

    I don't even know what to do. It just doesn't work. I fully revert to the last commit, removing all changes in the workspace, yet somehow it's not fully reverted. What is the source control even doing if not keeping a history of my project? Even though I made three separate commits since "upgrading" from Collab to this trash system, the workspace isn't the same after cloning fresh as it was after making those commits. All I can say is WTF.

    EDIT: So actually just now I decided to try one more time (not least because I actually need this project to work). I deleted the project folder again and redownloaded through Hub again. This time it seems to have worked. I'm really f*cking concerned that it can work one time but not another. How brittle is this source control software that the repo can partly fail to clone or can't fully revert to a previous revision or whatever the frick it was doing??
     
  2. Ryan-Unity

    Ryan-Unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @Clonkex, I'm very sorry that you had such a rough first impression of Plastic SCM. I would like to start off by saying that we just recently added the option to revert to an earlier changeset, by using the Go Back To feature in the Changesets tab, in Version Control v1.14.16/1.15.16. Also, you should have seen an option under the Cog menu of the Plastic SCM window to Launch Plastic SCM to open your current workspace in the external Plastic GUI. Were you not seeing that option?

    The boot.config file being marked as changed, even though there were no differences between the two versions, is odd and we'll look into that. There should not be false positives like that. Did you see the boot.config file listed as modified in the Plastic GUI as well as in the Unity Plugin?

    As for your situation where the first time you downloaded your project the workspace was marking some files as deleted and some as added, that is very concerning and if you happen to have any screenshots of that behavior then I would be very interested to see that. That should not have been happening. We understand that the migration has been difficult for a lot of people, with plenty of parts moving behind the scenes to ensure that no work is lost and to make the transition as smooth as possible. I'm sorry that it didn't seem to be the case for you.

    After downloading your project a second time, does it seem to be working as expected? The Unity Plugin integration should work more smoothly going forward compared to having recently transitioned from Collab if you were having issues before, so your experience should be much better going forward.
     
    Clonkex likes this.
  3. Clonkex

    Clonkex

    Joined:
    Jul 31, 2012
    Posts:
    31
    Hi Ryan. Apologies for the frustrated rant yesterday. I've been on your end of this conversation before so I understand how tiring it can get.

    I always forget that Unity isn't just in a fixed state per version. Parts of it are separated into packages and can be updated separately. For what it's worth, I think this is ultimately a good thing, but also extremely confusing to beginners (not that I'm a beginner, but I like to advocate for them). After updating the Version Control package I now see the option to revert to a previous revision (though I have to say I'm a little confused what the different between "Switch to this changeset" and "Go back to this changeset" is - maybe I need to learn Plastic, but on the other hand, this is yet another level of confusion and frustration for beginners).

    I wasn't seeing it, but only due to my own incompetence. I always kept the Collab window next to the Inspector tab in a vertical column on the right. I put Plastic in the same place because while it's not really designed to be so narrow, it was quite usable (for simple commits, which is all I need 99% of the time). What I forgot about is that it hid all the buttons at the top-right of that window outside the viewable area. I was thinking the Branches tab was the only thing that was hidden.

    Yep, sure did. In the external Plastic GUI it was showing the file as a "Changed item" in the Pending Changes tab. If I enabled the Show Diffs toggle and then clicked the file, it was empty in both sides of the diff and said very clearly "File is identical". I later discovered that there's an option in Plastic to check file contents rather than only timestamp (that was turned off by default - seems like a strange default to me), but I don't remember if that made a difference.

    Concerning indeed lol. Unfortunately I have no screenshots. I will probably try downloading the project again to see if I can replicate. I have an idea of something I can try.

    I've been working with source control programmatically the last few months. It's a pain trying to cover every possible case. I maybe have some inkling of the work you guys are having to do.

    Yep, working perfectly after the second time. I launched my game and it all worked fine with only the same errors I was expecting due to half-finished code.
     
  4. astanid

    astanid

    Joined:
    Apr 5, 2021
    Posts:
    145
    I have the same problem. I wanted to create new project out of old one.
    Duplicated folder, renamedd it, unliked from unity, create new link, then connect to plastic SCM with new repo. All files from an old project got 'private' mark and were not chechked correctly
     
  5. Ryan-Unity

    Ryan-Unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    No problem, I get where your frustration was coming from. And splitting features into packages definitely helps with pushing fixes and features out to users faster. But as you mentioned, it can come with caveats. You're right that we need to clarify the messaging around how Go Back and Switch differ and we have plans to update that in a later release.

    The biggest difference between the two is that Switch takes your workspace back to the changeset you selected so that you can view your project at that earlier state, while Go Back does a subtractive merge of the changes between the latest changeset and the one you selected, allowing you to undo those changes and push new changes. It works close to how Go Back worked in Collaborate.

    I see what you mean about the Cog menu being hidden when using it in vertical view. I'll make sure that this design oversight gets looked at by the team. We should make sure that the window never gets so thin that it cuts off important options. Or redesign it so that it can cater to being used in that view too.

    Interesting, thank you for checking that the boot.config file was listed in the Plastic GUI too. It's likely that the timestamp of the file is being adjusted by some aspect of Unity, even though the contents of the file don't change. That would explain why Plastic is detecting it as a change. Please let me know if you notice the file reported as changed now that you're checking if the file contents have changed a lot too. And let me know if you notice anything odd when you try re-downloading your project to repro the issue you ran into earlier.

    For now, I'm really happy to hear that Plastic SCM is working as intended after you downloaded the project a second time, and again, I'm so sorry that this was such an initial hassle. I'll pass your feedback along to the dev team so that we can look at the other users you mentioned. We're still striving to make this tool as user-friendly (for those new and experienced with source control) as possible, so feedback like this helps a lot.
     
    Clonkex likes this.
  6. Ryan-Unity

    Ryan-Unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @astanid, I'm sorry but could you specify which problem you ran into? Were you trying to revert to an earlier changeset, had missing changes, or something else?

    If you'd like to re-link your existing project to a new workspace, you can do that by doing the following:
    1. Open the Cog menu in the Plastic SCM window of the Unity Plugin and select Turn Off Plastic SCM.
    2. Press OK. (This will delete the .plastic folder in your project, where all the workspace-related settings are stored. It will NOT delete the previous workspace from your cloud repo.)
    3. In the Plastic SCM window, pick Create Workspace.
    4. Create a new name for your workspace, then finish creating your workspace.
    5. Checkin your pending changes.
    Now you should be able to work with a brand new workspace using your existing project.
     
  7. Clonkex

    Clonkex

    Joined:
    Jul 31, 2012
    Posts:
    31
    I don't really understand what you're saying, but taking a stab, it seemed to me that the ignore.conf file wasn't in the repo (which is strange, when I think it's standard practice in both Mercurial and Git to put the ignore files in the repo - but maybe Unity wants to manage this file on their own?).

    Following is the default ignore.conf file that Unity created for me, in case you want to try adding this file into your project directory and see if it fixes things for you:

    Code (csharp):
    1. Library
    2. library
    3. Temp
    4. temp
    5. Obj
    6. obj
    7. Build
    8. build
    9. Builds
    10. builds
    11. UserSettings
    12. usersettings
    13. MemoryCaptures
    14. memorycaptures
    15. Logs
    16. logs
    17. /ignore.conf
    18. *.private
    19. *.private.meta
    20. ^*.private.[0-9]+$
    21. ^*.private.[0-9]+.meta$
    22. **/Assets/AssetStoreTools
    23. **/assets/assetstoretools
    24. /Assets/Plugins/PlasticSCM*
    25. /assets/plugins/PlasticSCM*
    26. .vs
    27. .gradle
    28. ExportedObj
    29. .consulo
    30. *.csproj
    31. *.unityproj
    32. *.sln
    33. *.suo
    34. *.tmp
    35. *.user
    36. *.userprefs
    37. *.pidb
    38. *.booproj
    39. *.svd
    40. *.pdb
    41. *.mdb
    42. *.opendb
    43. *.VC.db
    44. *.pidb.meta
    45. *.pdb.meta
    46. *.mdb.meta
    47. sysinfo.txt
    48. *.apk
    49. *.unitypackage
    50. .collabignore
    51. crashlytics-build.properties
    52. **/Assets/AddressableAssetsData/*/*.bin*
    53. **/assets/addressableassetsdata/*/*.bin*
    54. **/Assets/StreamingAssets/aa.meta
    55. **/assets/streamingassets/*/aa/*
    56. .DS_Store*
    57. Thumbs.db
    58. Desktop.ini