Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Excluding files/foldlers from import?

Discussion in 'Package Manager' started by kreso, May 28, 2019.

  1. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    105
    Hello,
    my use case is I am making a package to connect with server, also it uses Facebook SDK, and serialize/deserialize some JSON (Newtonsoft's asset store package).
    This means I am using 2 packages (not through package manager).

    Also importantly, I am using JetBrains Rider. This editor creates a Plugin/Editor folder and puts some files in it.


    Now that my package is completed I want to import it and use it in my current project.

    My current project already uses JSON library.
    And I don't want Facebook SDK to be used from the package - I want to use it from my current project so I may update it when needed (not as important though).
    Also, Rider editor is now shooting errors it is already present (which it is) in the current project.


    This was all a setup for the question:
    Is it possible to exclude folders from being imported into a project?

    I would love to set folders that are to be ignored/excluded (like Facebook SDK, JSON, and also importantly - Rider).

    I thought of creating another 'workshop project' that holds JSON asset, Facebook SDK and import my package there.
    Then import my package into this 'workshop package', to sort of encapsulate it.
    This may work in decoupling Facebook SDK, but it would still need JSON asset, and wouldn't solve the Rider plugin files problem.


    Any suggestions how to deal with my situation?

    Kind regards,
    Kreso
     
  2. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    105
    Got in touch with JetBrains support. Very helpful.
    Rider 2019.1 can have this option unchecked "automatically keep editor files updated.." and it will no longer store files in my Unity project.

    This was the biggest problem. Now I can make my package work.


    Would still love to hear ideas how to decouple Facebook SDK, and Newtonsoft JSON library from the package.
    Hopefully they will be moved to packages, but until then ... :)
     
  3. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    105
    Got it!
    I created a package out of Json asset (then added it to my own package as a sub-package), and did the same for Facebook SDK.

    All the packages!:cool:
     
    benoitv_unity likes this.