Search Unity

Local Custom Package Path

Discussion in 'Package Manager' started by calc1fer, Dec 16, 2019.

  1. calc1fer

    calc1fer

    Joined:
    Oct 5, 2019
    Posts:
    62
    Hey, I'm building a custom package to share my custom asset between several projects.
    I'm developing my lib in [ProjectName]/Assets/com.cqtd.customtool/..
    with com.cqtd.customtool/package.json.

    And other projects import that package.json from the Assets folder of lib dev projects.
    Can I set the directories like this? or do I have to create a custom package in the Packages folder?

    I want to develop my lib in the Assets folder like this and import this at other projects as a custom package.
    MyCustomLib/Assets/com.cqtd.customtool/package.json

    Or do I HAVE TO set directory like this?
    MyCustomLib/Packages/com.cqtd.customtool/package.json

    Thanks.
     
  2. maximeb_unity

    maximeb_unity

    Unity Technologies

    Joined:
    Mar 20, 2018
    Posts:
    551
    Hi @CQTD,

    As described in the Unity Manual, a custom package must be located under the
    Packages
    directory to be properly registered as an embedded package by the Package Manager. If it's under
    Assets
    , it will not be recognized as a package at all.

    You can also reference it with a
    "file:<path-to-package>" 
    dependency, also described in the Unity Manual.