Search Unity

Request Unity Package file to Package conversion feature

Discussion in 'Package Manager' started by optimise, Sep 2, 2018.

  1. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    While waiting Asset Store upgrades to new Package format, I really need this feature that able to convert .unitypackage file from asset store to built in package of Package Manager that will put directly into Packages folder instead of usual Cache folder.
     
  2. M_R

    M_R

    Joined:
    Apr 15, 2015
    Posts:
    559
    - import the package
    - cleanup eventual garbage
    - wrap all the code inside .asmdef (you need at least one for runtime and one for editor)
    - create a new folder in the <project>/Packages/ folder (using Finder/Explorer)
    - create a package.json file inside the folder, with at least "name" and "version" keys ("displayName" is what is visualized in PMUI and project window)
    - move the package contents to that folder, (from Unity, to preserve .meta files)
    - put it somewhere accessible from other projects (e.g. github or inside your home folder)
    - now you can use it in other projects by putting a dependency like
    "name.of.the.package":"file://path/to/where/you/put/it"
    in your manifest.json

    note: some packages have hardcoded paths or modify themselves, so they will break when you move them