asusralis
Topic Author
Posts: 144
Joined: 30 Jul 2018, 05:03

Unity package possible with package manager & github?

24 Mar 2023, 11:29

Hello! I am using the noesis unity package to use with Unity. This works if you are working by yourself, but with multiple collaborators & git this will fail as the directory points to the local machine. There is an option to install a package using a git URL in Unity. Is it possible to add Noesis to github so you can install this way? Or is there a better way to fix this problem? Thanks!
 
User avatar
maherne
Site Admin
Posts: 42
Joined: 01 Jul 2022, 10:10

Re: Unity package possible with package manager & github?

24 Mar 2023, 18:55

If the Noesis package is located within the Unity project folder, the package reference will be relative to the project. This will allow you to share the package with the project.

I recommend creating a LocalPackages folder beside the project Assets folder, placing the Noesis package there.
 
User avatar
jsantos
Site Admin
Posts: 3971
Joined: 20 Jan 2012, 17:18
Contact:

Re: Unity package possible with package manager & github?

27 Mar 2023, 12:23

The latest Visual Studio Extension is doing something similar, creating a LocalPackages folder. Please have a look at it.
 
User avatar
arkaen
Posts: 3
Joined: 08 Apr 2023, 01:23
Location: Baton Rouge, LA
Contact:

Re: Unity package possible with package manager & github?

30 Aug 2023, 22:39

Wanted to share how we handle this, in case another Unity dev has trouble with this in the future ...

We use a relative package path in packages:
..\..\External Packages\NoesisGUI
This causes Unity to look up alongside the Unity project for "External Packages\NoesisGUI" ... this means that every developer on the project simply adds an "External Packages" folder inside the folder where they keep their Unity projects, and extract the Noesis package in there. Unity will automatically find it for you if you do it properly. It adds a little extra responsibility for devs, but I think it's super simple to just make a folder alongside all your Unity projects and extract the Noesis package in there.

The added benefits are:
1) It doesn't need to be stored/tracked in your git or vc repository
2) The same package can be shared amongst all your Unity projects

Whoever is the project manager or lead only needs to edit one line in two files ... first, just manually add NoesisGUI in package manager from disk, then you'll notice changes to:
manifest.json
packages-lock.json

It will have a full, absolute path to NoesisGUI package. Simply edit it to the relative path I showed above (..\..\External Packages\NoesisGUI) then instruct your team to set up that folder alongside their Unity projects in whatever folder they keep it in. That way it'll work regardless of operating system or the root location a person chooses to store Unity projects.
"Make it exist,"
-- Arkaen Solutions

Who is online

Users browsing this forum: Google [Bot] and 20 guests