Package Manager Installs

Like what your seeing?

Introduction

An easy and much more flexible way to install stuff into your Unity Project.

Why

Its the method used by Unity internally, its the method used to install all Unity open source and community contributions and its the method used by many asset developers … including Heathen.

It has quite a few benefits over the older .unitypackage import method but it does take a bit of learning for users that are new to the concept.

History

With Unity 2018 Unity started to introduce the concept of the Package Manager.

While in standard Unity fashion the transition away from classic .unitypackage exports to the new Package Manager approach has been

  • Slow

  • Miss managed

  • Clunky

  • Painful

  • Horrible

  • etc. etc. etc.

In classic Unity fashion the benefits have been ... well nothing short of transcending and awe inspiring.

Yes but WHY

The Package Manager for the first time lets us pull active source ... not a file export ... note a .unitypackage ... that is really just a proprietary zip file ... ya its that bad.

Second we can describe dependencies ... 😍... if your an asset developer creating coded assets this is GOD level awesome.

Finally and one of my favourite features ... no more bloat. Not only can we remove the deep copy of every dependency we might use thus removing the version conflict hell of yester year we can also distribute samples, extensions, demos, etc. as additional downloads. So you no longer need to download 10 gigs of sample content you will never use just to get at the 15mb of code you wanted 🤩💖 ... unless you want to of course ...

Troubleshooting

No git executable was found

Unity's Package Manager uses git to download and import assets from Git repositories. This is the method used by Unity internally, used for all of Unity's open source and community assets and used by Heathen.

For this to work you must have installed git as per Unity's documentation

Installing Unity Packages via Git URL as we do here requires that you have Git installed. as outlined in Unity's documentation. If you don't have it already you can install Git from the following link:

Note that this does NOT mean you will be using Git as a source repo, it is simply a set of protocols used by Package Manager to download the required code from its target repository.

It is a relativly common problem that Unity isn't able to detect Git once it has been installed. The very first thing you should try is to **restart your machine**. Sadly Unity doesn't know how to properly read environment variables and so only reads for them once on start up assuming they will never change 😂

Assuming a simple restart doesn't resolve the issue for you the most likely issue is a problem with how the environment variables where set on Git install … or rather where not set.

This YouTube video is not sponsored by Heathen but seems to help a lot of people.

If none of the above works for you then you need to contact Unity's technical support. This is a problem with Unity not with our code and not with anything we can really effect.

To get you going while you wait on Unity's support to get back to you, you can simply download then Git repository for SystemCore or whatever else you need and install it manually.

I'm a Sponsor but cant install

The most common cause of this problem is that you are not logged into GitHub with the same account that sponsored in such a way that UPM is able to access the private repository where Heathen's assets are stored.

For example

1) You have multiple GitHub accounts and your Windows Credential Manager is using the "other one" as in the one you didn't sponsor with.

2) Something else is blocking the popup to login from windows

When you first try to add a package using Unity Package Manager from a private or secured repository you should get a popup that look like this

It may not have taken focus so look behind other windows. When you find it click the "Sign in with your browser" button ... that will open your default browser, ask you to login or if your already logged in it will show a blank page and that's it. You will now need to restart Unity and try again.

If for some reason you do not get this popup then odds are you already have a GitHub credential stored on your machine. In Windows this is stored via the "Credential Manager" and it may be stored under a few different names

The above images all show variations of the credential as used. You should be able to force the popup to show again by simply removing any GitHub related credentials already stored in Windows Credential Manager.

Be sure to restart Unity and Unity Hub and then try again.

For note you can also use command line to update your credentials ... Git is fundamentally a command line based tool

You can read more on the subject here

Last updated