Search Unity

Package Manager to manage your own Code Library?

Discussion in 'Package Manager' started by Aaron-Meyers, Nov 28, 2018.

  1. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    305
    In its current state, is the Package Manager a good option for managing a library of code that is re-used between multiple projects? Are there any tutorials out there that walk through the steps of setting something like this up with your own code library?
     
  2. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    756
    Hi @Aaron-Meyers,

    For 2018.3 and 2019.1, I would say yes. For 2018.2 and prior, less so.

    Our documentation is poor for the moment. We are in the process of writing a completely new section in the Unity user manual for 2019.1 release that will guide you through the creation, hosting and ways to share your own custom packages.

    In the meantime. You can ask for help here. There is also a bit of information in the Package Manager User manual:
    https://docs.unity3d.com/Packages/com.unity.package-manager-ui@2.1/manual/index.html

    There is also two sticky thread that exposes two features to help you share your own libraries:
    * Scoped registries: https://forum.unity.com/threads/setup-for-scoped-registries-private-registries.573934/
    * Git Packages: https://forum.unity.com/threads/git-support-on-package-manager.573673/

    Hope this will help,

    Pascal
     
    GarthSmith likes this.
  3. Kylotan

    Kylotan

    Joined:
    Feb 17, 2011
    Posts:
    212
    I am using shared code packages on 2018.2 with a reasonable amount of success. Sometimes Unity struggles to open files in Visual Studio correctly when you double-click on them, and the debug log callstacks can also end up looking a bit weird. And you need to be careful about getting assembly references right. But for the most part it works. It's also fine with simple assets, but not with scenes (currently).