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

Share package/plugin import settings through version control

Discussion in 'Package Manager' started by Fleer_CTC, Oct 30, 2018.

  1. Fleer_CTC

    Fleer_CTC

    Joined:
    Jun 15, 2017
    Posts:
    9
    Hi there,

    I'm just looking into packages at the moment, and was wondering that considering plugins are stored outside of the Unity project directory (e.g. under %AppData% on Windows) along with their meta files, how am I meant to share the meta import settings via version control?

    Cheers
     
  2. pedro_unity

    pedro_unity

    Joined:
    Jan 16, 2017
    Posts:
    172
    Hello @Fleer_CTC,

    I will be presuming you are referring to Unity packages that are stored in the global package cache in App Data. I'm not sure why you would want to share meta import settings with other users. Maybe you can elaborate on your specific need a little more in detail so that I can see if there is a better solution.

    As for packages, they're immutable. Once you've downloaded one into your project through the package manager UI, the manifest.json file will be rewritten to contain the name of that package, like this:


    "defaultDependencies": {
    "com.unity.analytics": "3.0.9",
    "com.unity.purchasing": "2.0.1",
    "com.unity.ads": "2.0.8",
    "com.unity.textmeshpro": "1.3.0",
    "com.unity.package-manager-ui": "2.0.0-preview.7",
    "com.unity.collab-proxy": "1.2.9",
    "com.unity.modules.ai": "1.0.0"


    The manifest.json should be picked up by your version control software and shared with other contributors. Once they load the project, Unity will read the manifest.json and fetch the packages contained in this file from the distant registry. Because a package is immutable, their import settings are also immutable. The meta file will be generated through the asset database of Unity after the import of said package.

    TLDR version: share the manifest.json file at the root of your project through VCS.

    Let me know if you have more questions.

    Cheers,
    Pedro
    Unity STE
     
  3. Fleer_CTC

    Fleer_CTC

    Joined:
    Jun 15, 2017
    Posts:
    9
    Thanks for your response @pedro_unity !

    I am already sharing the manifest.json via the VCS, however the specific issue I'm coming across is around the Alembic package and WebGL builds (but I imagine this issue would come up for other incompatible package/builds)

    I had to turn off the Alembic package being built with a WebGL build, which I could only do in the global package cache within App Data, but I want all users on version control to have the same settings that exclude the WebGL build from Alembic compilation (so that they don't just get an error when they try to build a WebGL).

    I hope that makes sense, please let me know if I can add any details.
     
  4. pedro_unity

    pedro_unity

    Joined:
    Jan 16, 2017
    Posts:
    172
    Hello @Fleer_CTC,

    Yes, i understand the issue a bit better now. Let me circle back with the team for solutions as I'm not entirely sure on the best way to resolve this way.

    Cheers,
    P.
     
  5. markvi

    markvi

    Joined:
    Oct 31, 2016
    Posts:
    118
    Hi @Fleer_CTC, it's a bug that WebGL is enabled. I've logged it as case 1097101 and it will be fixed in the next preview release.

    Can I ask why you're building a WebGL project that includes Alembic? Just curious how people are using Alembic in the field.

    cheers,
    -Mark
     
  6. Fleer_CTC

    Fleer_CTC

    Joined:
    Jun 15, 2017
    Posts:
    9
    Hi @markvi
    I'm actually trying to **exclude** WebGL from using Alembic.
    It does look like the v1.0 Alembic package no longer clashes with the WebGL build, so that's a bonus.
    But I feel the question is still valid, how would you share target exclusions from packages via VCS?
     
  7. pedro_unity

    pedro_unity

    Joined:
    Jan 16, 2017
    Posts:
    172
    Hello @Fleer_CTC,

    The .meta files contains import settings. In a normal package, these are immutable and cannot be rewritten. However, if you embed the package, you will be able to modify the .meta and share this newly embedded package through VCS as if it was a normal asset.

    Let me know if you have any more questions.

    Cheers,
    P.