steamvr_unity_plugin icon indicating copy to clipboard operation
steamvr_unity_plugin copied to clipboard

Release plugin as a set of Unity Package Manager packages

Open dantman opened this issue 6 years ago • 2 comments

Unity has a new package management system (UPM). It works pretty nice and has a decent number of advantages.

  • Library code is kept out of the Assets/ folder
  • If you open the Package Manager UI Unity will tell you when a package is out of date
  • Unity takes care of updating the package instead of needing t o do it (semi-)manually
  • There is no need to "Delete SteamVR folder and import" to update a package

I think it would be really nice to have UPM packages as an installation option for the SteamVR Unity Plugin.

Though the interaction system should probably be a separate package.

dantman avatar Jan 13 '20 08:01 dantman

FYI: You can use the plugin as a package already. You just need to add package.json directly under Assets/SteamVR/ and link directly there from manifest.json.

In my environment, the entry in manifest.json looks like this:

"com.valve.steamvr": "file:C:/GameDev/GitHub/steamvr_unity_plugin_245/Assets/SteamVR",

The package.json that I use is:

{
    "name": "com.valve.steamvr",
    "description": "Valve maintains this Unity plugin to smoothly interface with SteamVR.",
    "version": "2.5.0",
    "unity": "2018.4",
    "displayName": "SteamVR Unity Plugin"
}

I believe https://github.com/ValveSoftware/steamvr_unity_plugin/pull/491 has already been merged. But you might have a look at that one in case you run into issues.

JashanChittesh avatar Jan 29 '20 20:01 JashanChittesh

I've noticed a new branch UnityXRPluginis here for UPM, created by @keithbradner. A great move! The version is not consistent with the main release yet (v2.6.x vs 1.0.0-preview.1), but maybe that is only for the beta stage.

I'm the creator of OpenUPM, a managed registry collects open-source UPM package with automatic build-pipelines. It monitors Git tags and builds new package releases. The platform is hosting more than 200 UPM packages at the time of writing. @ilterbilguven submits this package to our platform and brings me here.

However, all builds are failed because of lacking package.json in Git tags. To make it work, it requires creating a new Git tag based on the upm branch. e.g. whenever you create a GitHub release (from the master branch), you also create a Git tag named upm/x.y.z from the UnityXRPlugin branch. Then OpenUPM can take care of the rest to publish a new package release.

There're some articles discussed using CI to simplify the approach. But it can be a case-to-case thing to adopt to this repository.

favoyang avatar May 02 '20 14:05 favoyang