MirrorNetworking / Mirror

#1 Open Source Unity Networking Library
https://mirror-networking.com
MIT License
5.11k stars 758 forks source link

Add support for usage via Package Manager #2682

Open las-nsc opened 3 years ago

las-nsc commented 3 years ago

Implement a package manifest as described here: https://docs.unity3d.com/Manual/upm-manifestPrj.html

Then it becomes easier for people to load a specific or the latest version of Mirror using just a GIT link in the package manager, meaning that Mirror is less likely to be interfered with unintentionally and user assets are simpler.

SoftwareGuy commented 3 years ago

AFAIK this has been done by a third party who makes a UPM compatible release repository that you can use to pull in the latest Mirror code via UPM. However, since Mirror is also released to the asset store, there was internal discussion about making Mirror mainline also available via UPM.

The problem here is that we're not 100% sure about the terminology used in the Asset Store TOS about having a version available via UPM and a version available in Asset Store. We don't want to get the asset store release removed for violation of the TOS.

This is a interesting topic - thanks for starting the thread. Hopefully vis can weigh in as he did have some comments on the whole UPM thing going back a while.

MrGadget1024 commented 3 years ago

This has come up before. We publish to the asset store because that's where we get visibility and and star ratings and reviews and analytics of downloads that we don't get from UPM / GitHub. Unity Package Manager shows your asset store packages already. Expect this to be closed.

las-nsc commented 3 years ago

In an ideal world, downloading from the asset store would add a package dependency rather than importing into the project, but Unity is dragging its heels a bit on that (been talking about it for 2 years). In the mean-time, adding UPM support on the official stream would be a good compromise.

scriptsengineer commented 3 years ago

An easy way is to add a package.json in the Assets/Mirror folder just like I did in this commit: https://github.com/ExpressoBits/Mirror/commit/ca729d4bb0752cf773d15c783e40ba56d8c99687 This would help a lot since it is possible to define a package with branch and specific folder:

{
  "dependencies": {
    "com.vis2k.mirror": "https://github.com/Vis2K/Mirror.git?path=/Assets/Mirror#v40.0.9",
  }
}