Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice
Unity's version control component has been upgraded to Plastic SCM.

[Solved] Unity Collab cannot exclude directory

Discussion in 'Unity Collaborate' started by Erdroy, May 31, 2017.

  1. Erdroy

    Erdroy

    Joined:
    Jan 12, 2013
    Posts:
    19
    Hello,
    I'm trying to exclude specific directory for use with my preferences,
    but it seems that Collab has some sort of issue.

    Let say, I don't want to sync game code through Collab but git,
    so I have directory like `Assets/ProjectName/Code/`

    And there is my problem, I can't exclude that Code directory.
    I've tried:
    /Assets/ProjectName/Code
    /Assets/ProjectName/Code/
    Assets/ProjectName/Code/

    and probably every other solution that would work with git (.collabignore is trying to sync, so this is not a problem with invalid ignore file).

    I don't know if that is intended or something, but this should be possible.
    Tested with Unity 5.6.1p1 and 2017.1.0.b7.

    Thanks in advance,
    Erdroy.
     
  2. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    @Erdroy I'm sorry to hear that you're running into issues.
    Assets/ProjectName/Code/ should have given you the results you're looking for. I just tried a similar folder structure myself and it excluded the contents of that folder. If it works, then in the Project tab in Unity you should see grey excluded icons on the contents of that folder.

    Can you try it on a single asset to see if it works for that? Try creating a material in Assets/ProjectName and adding the following rule in .collabignore:

    Assets/ProjectName/New Material.mat
     
  3. Erdroy

    Erdroy

    Joined:
    Jan 12, 2013
    Posts:
    19
    @ryanc-unity The results are the same.

    upload_2017-5-31_22-43-40.png

    Enabled One-column to show the whole file structure.
    upload_2017-5-31_22-43-57.png

    Nothing is ignored.
    upload_2017-5-31_22-44-33.png

    So, maybe there is some problem with collab, and it doesn't use the collabignore at all? (of course - restarted the Editor)
     
  4. Erdroy

    Erdroy

    Joined:
    Jan 12, 2013
    Posts:
    19
    Oh, I found what was the source of this issue.
    Notepad++ inserted Dos/Windows Line endings and UTF16 Format (dunno why)...
    Converting to UNIX and setting format to UTF-8 fixed it.
     
    Ryan-Unity likes this.
  5. ooblii

    ooblii

    Joined:
    Feb 23, 2013
    Posts:
    30
    I'm having the same issue in 5.5.3p4. According to the docs, the .collabignore file should be created automatically if using Collaborate? I had no such file in the root and had to make it myself in Notepad++; tried the line ending fix suggested by Erdroy, but still no luck.

    I'm trying to keep Google Play Services out of my iOS build so I added:

    Assets/GooglePlayGames/**
    Assets/PlayServicesResolver/**

    to the created file, restarted Unity (several times!) but both of these folders show up as wanting to publish.
     
  6. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @ooblii! The Ignore File feature was added in 5.6. You will need to update in order to use it. I'm sorry for the confusion.
     
  7. ooblii

    ooblii

    Joined:
    Feb 23, 2013
    Posts:
    30
    ohhhhhhhhhhhhhh, my bad. Thanks for clarifying.
     
    Ryan-Unity likes this.
  8. MikeyUchiha

    MikeyUchiha

    Joined:
    Jan 8, 2011
    Posts:
    109
    @ryanc-unity Can you guys push this out to Unity 5.5.x? There's a few Asset Store developers who still haven't finished updating to 5.6 which makes it difficult to upgrade.

    Thanks
     
  9. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @MikeyUchiha! I totally understand the frustration of not being able to update right away until your important plugins are updated first. Unfortunately 5.5 isn't our highest priority at this time and we don't have the time to back port this feature to 5.5. We'll be sure to revisit this after we release 2017.1 to see if enough people are still using 5.5 and if this feature is in high enough demand to warrant a back port still.
     
  10. MikeyUchiha

    MikeyUchiha

    Joined:
    Jan 8, 2011
    Posts:
    109
    @ryanc-unity Thanks! I went ahead and updated to 5.6 and it looks like Unity handled the upgrade fine without any issues so far. I'm running into another problem where now that I have the ignore file working. It shows up in by Unity Editor that the files are being ignored. However, when I look at my Collaborate history the files are still there. How can I remove the ignored files from the library/history?

    Thanks
     
  11. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    @MikeyUchiha I'm glad to hear that your upgrade went smoothly! What you're seeing is actually by design. Adding files and folders to .collabignore doesn't tell Collab to delete any and all mentions to them throughout the project's history. Instead, it's more like telling Collab "Hey, I might change these later, but don't worry about them." That way, it won't track any future changes to those exceptions. But the changes made to them in the past will still be accessible if you choose to Go Back to those revisions in the Collab History window. Does that answer your question?
     
  12. MikeyUchiha

    MikeyUchiha

    Joined:
    Jan 8, 2011
    Posts:
    109
    @ryanc-unity I'm not concerned too much about the history but more so about the fact that it's including them in Cloud Build when it shouldn't be. Other than having to unlink the project, delete the Collab Snapshot, archive the Collab project and reupload everything all over again is there an easier process?

    For example, there may be a scenario that I find out that I need to ignore all files in the AssetName/Demo/** folder. If I add this to collab ignore file it notices this but it doesn't remove the files. On top of which, my Cloud Build still continues to attempt to import everything under that folder.

    Thanks
     
  13. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Ah, I see what you mean. Unfortunately, in that instance, what you'll need to do is comment out those rules in the .collabignore file, remove the assets you don't want included with your build from your project, push that change via Collab, then uncomment the ignore rules and add the assets back into your project.
     
  14. MikeyUchiha

    MikeyUchiha

    Joined:
    Jan 8, 2011
    Posts:
    109
    @ryanc-unity The problem is that I still want the files locally. I just don't want them included in the cloud build. It doesn't make sense that I have to delete the files in my personal project just to remove them from Collab. There should be an easier way to do this. =\
     
  15. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    You can still keep your files locally. By "remove", I mean move them out of your project and onto your Desktop or somewhere else, so that you can move them back in after you've pushed their "delete" in Collab (Collab will think they've been deleted since they're no longer in the project). Then you can uncomment the ignore rule, move the assets back in and you'll be all set. You'll get to keep your files locally and Collab won't add them back, so Cloud Build won't include them in the builds anymore.
     
  16. MikeyUchiha

    MikeyUchiha

    Joined:
    Jan 8, 2011
    Posts:
    109
    @ryanc-unity Thank you for the explanation of that work-around. I would definitely recommend looking into a remove feature in Collab to encourage more adoption. This seems like a pretty big hack. I appreciate your assistance though. :)
     
    Ryan-Unity likes this.
  17. ItsCaveMan

    ItsCaveMan

    Joined:
    Feb 14, 2015
    Posts:
    7
    After an hour of scratching my head, testing and trying, and what felt like a hundred Editor restarts - i achieved ignoring the directory i sought to excluded.
    My problem was that i had been * asterisks-ing everything, when in fact you only need the path - Assets/folderToIgnore
    Not - Assets/folderToIgnore*

    Pro-Tip:
    i did not in fact need to restart the Unity Editor as the docs suggests, as a change to .collabignore immediately reflected in Editor(after some hang time) and proceeded to collabed successfully
     
  18. jhlee_unity

    jhlee_unity

    Joined:
    Dec 15, 2017
    Posts:
    2
    i had similar problem but your profile picture was very distracting so i couldnt help myself from replying