Search Unity

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

Unity Collaborate doesn't respect User read-only setting in Projects, need a workaround for our kids

Discussion in 'Unity Collaborate' started by spadesmaster, Jul 21, 2017.

  1. spadesmaster

    spadesmaster

    Joined:
    Dec 29, 2010
    Posts:
    11
    If we have fun@dreamquest.org set to have User only access in our Unity ID Organization/Project settings, kids logged in and using that ID are still able to push changes up to Collab. This is contrary to the Unity Services tab that clearly describes User = can only read and view data, not edit it. Is this a bug I should report or am I missing something?

    In the long-term, we would love to have the ability to make certain parts of the project read-only so they can push just changes in their scene or folder and not in our shared stuff. However, I would settle for just being able to prevent them from pushing changes at all and letting our teachers handle merging their stuff in and using Collab to push the build back out to them.

    We teach Unity to kids and have recently started using Unity Collaborate not just with our staff but with the kids to help streamline debugging and fixing their projects. There seem to still be some frequent bugs in Collaborate where the sync fails and we have nuke it and reload from scratch (restore doesn't fix) but we can work with that but this one issue is really causing us issues.

    I am very experienced with Unity having used it since 2.x days so I am open to specialized custom Editor/Inspector fixes and such. This is something we are dealing with everyday right now, so if there is a workaround such as setting files to read-only or setting some field in the .meta files or something or some plugin that might help (I looked and most of them help with merging but not multi-user permission issues). At this point, I am about to try use a Unity Custom Inspector script to see if I can prevent them from pushing the project up from inside Unity but thought I would check to see if anyone has a workaround or more elegant solution?

    Thanks from our teachers and kids!
    Christopher
     
  2. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @spadesmaster! I'm sorry for the confusion. We worded the permissions of the User role poorly. The "data" it's referring to isn't the project on Collab, but whether they can edit their roles (or the roles of others) in the project. We'll be fixing the text where this comes up so that it's clearer in the future.

    As for your situation, what you could try is this: In your account's Organizations section you can organize several Members in your Organization into a Group. This makes it easier to add/remove lots of users to a project at once. You could group all of the little developers-in-training into their own group and add them to the project when you want them to be able to sync with the project, then remove the group when they're done. Let me know if that approach works for you.

    I'm also interested in hearing more about those sync fails. Would you mind starting a new post about those issues you occasionally come across to see if we can help you out there too?
     
  3. spadesmaster

    spadesmaster

    Joined:
    Dec 29, 2010
    Posts:
    11
    Ryan I appreciate your response the group permissions also has some bugs in it but regardless of doesn't solve our need which is limiting the changes the kids can push

    Im pretty comfortable making editor inspector and even backend tools is the collab push or ability to make files read only exposed in some way or are there other plugins that might help with this?

    Thank you
     
  4. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Would you mind elaborating what bugs you're seeing when trying to use Groups?

    We currently don't expose any elements of Collab to be used for backend or Inspector tools. However, if you just want certain files to be read-only, then you can utilize Collab's Ignore feature to help with that. Push the files that you eventually don't want to be edited by the kids. Then, add those files/folders to your .collabignore file in your project folder so that future changes will be ignored by Collab. Then push your modified ignore file and have the kids update. They'll get the latest changes to those read-only files/folders but be unable to make any changes.

    If you want to make changes to them, then you can comment out your rules in the ignore file, push your changes, then uncomment and push your ignore file again.
     
  5. spadesmaster

    spadesmaster

    Joined:
    Dec 29, 2010
    Posts:
    11
    Thank you. The workaround using .collabignore sorta works for us, but it would be nice to have either project read-only access, or better yet, have permissions on certain folders to prevent checking in changes to shared files, etc. This is especially an issue since Unity seems to randomly fail importing textures sometimes or want to push changes to DLLs that I know the kids did not change but somehow happened in response to them doing something innocent in a scene somewhere.

    Sorry, there are so many issues we are having with Collab, it's hard to even list them, but I'll try.
    1. Removing, renaming, or moving files often takes 3-4 updates to finally 'stick' which means that most of our Cloud Builds fail giving errors about files that were long since removed or renamed.
    2. Clicking the details button on the Collab takes forever to popular Collab History and sometimes it just refuses to work at all (like on my own laptop) even if I wait hours... Since discarding changes doesn't work on deletes, renames, or adds, this means the only way I can resolve or fix it is to manually go through the folders and delete everything by hand.
    3. We are getting frequent errors about 'Error finding project' or 'Error unable to connect to server' (the red line across the top of the Services/Inspector window). This is on multiple systems and projects, all 2017.1.
    4. We are getting frequent errors about UnityConnectUserInfoRequest: Timed out while fetching user - please check your network connection AND UnityConnectOrganizationRequest: Timed out while fetching orgs - please check your network connection. Again this happens on multiple systems, multiple projects, and multiple locations even at my home that has a stellar Internet connection.
    5. Cloud Build seems to randomly fail (seems like more often on iOS and Android builds) on either shaders or 'internal' errors about 20-25% of the time. To make matters worse, it doesn't reset our build timer so we just have to restart the build again and wait another 12 hours.... Here is one such recent build failure:
      Code (CSharp):
      1. An internal Unity Cloud Build error has occurred (Unexpected termination of the channel).  The Unity Cloud Build team is addressing this issue, and this build can be restarted if needed.
    6. We are getting VERY frequent errors loading launcher upon Unity startup or Collab Update. This seems to have gotten much worse in the last few days. This is on 5-6 different computers, both Mac and Windows at my home, office, and classroom, all with different Internet connections so its clearly something on Unity's end. The errors look like this (screenshot also attached):
    Code (CSharp):
    1. Error loading launcher://unity/C:/Users/chris/AppData/Roaming/Unity/Packages/node_modules/unity-editor-home/dist/index.html?code=VhTTKx2JEq822pjlmVg5iQ001f&locale=en&session_state=8648a48338e119d543f066ee7f56e487a90a456da89fd869bb1699364aa94242.CnGt0EIW_YPX4wLXhZnn0w002f
    UnityCollabErrors.png
     
  6. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    I understand and that's certainly a feature worth looking into. You could also have the kids try to selectively Publish their changes by right clicking on changes they want to push and selecting Collaborate->Publish. That will ensure that they only push the changes they meant to push, instead of also including unintentionally touched textures or DLLs.

    Thank you for providing this detailed list! I have a lot of questions and feedback but don't feel like you need to reply to it all at once. You're welcome to PM me more details if you'd like.

    1) With the changes not sticking, does this seem to happen more often when both renaming and editing an asset? Are you committing a large number of changes at a time or making smaller incremental commits?
    2) How big of a commit history does your project have? 100 commits, 500 commits, 1000? By "discarding changes", are you referring to reverting your local changes to undo them? You should be able to do that for renames or deletes (adds can't be reverted since they don't have a state to be reverted to). Have you tried right clicking and Reverting on the files individually or using the Collab Toolbar?
    3) Do you see these errors when starting up a project or returning back to it after leaving it on for an hour or so? Or do you see it when normally working on the project?
    4) Same as above, do you see these errors when working on your project or just during startup?
    5) https://forum.unity3d.com/forums/unity-cloud-build.61/ Would be a better place for this kind of question.
    6) The Launcher team is aware of that bug and will have a fix for it soon.

    Thank you again for using Collab and letting us know about the issues that you are running into. We want to continue improving the overall experience and this feedback helps us greatly!
     
  7. spadesmaster

    spadesmaster

    Joined:
    Dec 29, 2010
    Posts:
    11
    I was unaware of the selective Publish option. That might be helpful. The .collabignore solution is also still helpful so between these workarounds I think we manage until you have something that scales up better. I know bigger studios will likely run into this even more than me so I'm confident this will improve over time. Right now, because of all the Collab sync issues (mostly #1 and #2) we have moved to a hybrid system that seems to work pretty well where they push their changes up during class and then if I make major changes in the evening, I just bring in a fresh Zip. Thankfully, as long as we don't rename the project or make super-major GUID-type changes, it seems to handle this just fine and they can login and immediately download or upload right away.

    1) Yes, this is an issue mostly with moving folders around in the hierarchy and/or renaming assets. I'm pretty sure I/you can recreate this problem by:
    • Collab Update,
    • Move an Asset Store addon folder from Plugins to Prefabs or similar,
    • Rename a script (and its class method to match),
    • Delete a script,
    • Push changes,
    • Go to a DIFFERENT computer and Update and you will end up with either duplicates (causing GUID/class conflicts) and the deleted script will still be there.
    • Worst of all Restore update often doesn't fix, so you have to fix manually or redownload the whole repo from scratch...
    2) Around 100 commits. None of these projects are more than a couple months old. Seems to happen equally as much on older projects as brand ones. Often times maybe more to the new ones since those are the least stable and the most likely to have major hierarchy changes or big deletes or renames. I think the Collab History panel not updating has something to do with the Network issues and issues #3 #4 and #6.

    3 and 4) I think these two have something to do with Internet packet loss or other unstable connections on our end or yours. I see this one frequently at our schools but rarely at home (where I have a fast reliable connection). You might try testing Collab with a 'dirty' Internet connection with some packet loss (such as we often have to deal with at schools or using a Mobile LTE connection). It seems like Unity becomes very unstable and slow if the Internet is not super-smooth.

    5) I will post over in Cloud Build but I'm not super worried about this. Its just annoying when it happens and I have to wait 4 hours to get another build... I emailed the education team 3 times over the past 2 months (via the contact form at https://unity3d.com/contact/get-in-touch and no one has responded to any of them about getting our educational grant license upgraded or at least getting us higher Cloud Build permissions. Could you help me get in touch with someone please since no one seems to be monitoring the Educational contact form on your Web site.

    6) Glad to hear it. This one seems to happen every single time I start Unity now on any computer any project at any location.
     
  8. Zapgun

    Zapgun

    Joined:
    Jun 3, 2011
    Posts:
    50
    Not trying to hijack the thread, but I'm also now getting the "Error finding project." error banner in my cloud build - as of last night. The project is quiet small, and only started recently (maybe 20 commits to collaborate). I first noticed the problem first started yesterday when I tried to open the project from my old Macintosh laptop, but it seems to also be happening on my main development machine as well now.
     
  9. spadesmaster

    spadesmaster

    Joined:
    Dec 29, 2010
    Posts:
    11
    I'm not sure if its related or not, but I have noticed that mixing Mac and PC dev platforms seems to throw Unity and/or Collab for a loop sometimes too...
     
  10. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    @spadesmaster

    1) We have a fix in the works for this exact scenario. You should see a much smoother experience around renaming and editing assets in the future.

    2, 3 and 4) That does sound Network related, like you suggested. We are currently working on improving the network connection issues of our Collab History window and Toolbar by swapping out the framework with a more stable one, less susceptible to poor network conditions. Thank you for bearing with us and we work on this transition.

    5) I'd be happy to ping the Education team for you about your requests. Would you mind PMing me your email so that I can forward it along to the team to help them find your requests? I'm sorry it's taken so long for you to receive a response from them.

    As for going between Mac and PC, there are issues that all project sharing/source control tools have trouble dealing with, including dealing with conflicting file line endings and different file name conventions. If you are looking for suggestions to help minimize these kinds of issues, try checking out our Expert Guide.
     
  11. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @Zapgun! I just checked with the Cloud Build team and this particular error was resolved yesterday. Would you mind double checking if you are seeing the same error as before?