ultraleap/UnityPlugin

[Discussion] Conversion to UPM

vabrador opened this issue · 10 comments

We should (probably) convert UnityModules to UPM.

UnityModules is Leap Motion's Unity SDK, and we've been distributing in the wild west of non-asset store Unity Packages for some time. The asset store never quite seemed right or practical, but distribution as a package in a proper package manager reflects what UnityModules has always tried to be (a collection of packages that form a simple tree of dependencies, with a Core SDK and dependent extension packages).

@StephenHodgson has helpfully point to https://github.com/XRTK/XRTK-Core as a reference we can use for converting UnityModules into a UPM-distributable format. We're probably not going to move on this fast, and we'll have to answer some questions, which I'll lay out here for future reference.

There are things we need to know first.

Questions before any transition:

  • How much does the repo change if we turn UnityModules into, say, three UPM packages (e.g. Core, Hands, Interaction Engine)? (Can it stay one repo?)
  • Does this transition break compatibility with older Unity versions, and if so, which ones?
  • Possibly more questions??

Questions for the community:

  • How much of a difference would it make to you if UnityModules was a UPM package?
  • How do you get your UnityModule source (github, or dev website .unitypackage?)

If it means a lot to anybody in particular, feel free to engage here. I'll use this thread for keeping track of concrete tasks for UPM as well, but there's no timeline right now.

Here's some great reference documentation from Unity as well:

https://docs.unity3d.com/Manual/cus-layout.html

https://docs.unity3d.com/Manual/upm-ui-giturl.html

Also if it's useful, you can still publish the packages as a legacy .unitypackage as well as the upm, but it's a bit more manual and involved depending on how you approach the problem.

For our repository we actually provide multiple delivery mechanisms.

  • We have a seed .unitypackage that registers our custom upm scoped registry (This is a bit advanced and I don't think it required for this unless you guys want to have a fancy custom url and scoped registry server)
  • Manual UPM manifest.json steps where you can copy/paste in the text
  • GitHub installation steps via Unity Package Manager using a mirrored split tree branch
  • Via Git Submodules and Symbolic linking (Very Advanced)

I'm using this SKD for about a month now. Using it for a company project. For me, it's more practical to have it as an asset. It's easier to delete (or not import) examples in final project. I don't know how you would manage examples with plugin manager. Also prefabs are simpler to use and modify - at least for me.

Maybe the biggest pro for switching to plugin manager would be if project size would be smaller. When you keep adding assets, the whole thing soon becomes 500 MB and over.

Examples are imported using the examples button in the upm window like all other packages. You'd still have the ability to delete them as needed. Nothing would change there.

Hey guys any update on this? We'd love to utilize this as a upm package

Would love to have it as a versionable UPM package. If need be, I could help with setting this up as a package or even give hints as to how to host your own scoped registry (Verdaccio).

Hey guys I created a few new repositories for the core, hands, and interaction engine modules.

I set these up so that they automatically get published to OpenUPM, but I'd like to transfer them to your org:

openupm
https://github.com/RageAgainstThePixel/com.ultraleap.core

openupm
https://github.com/RageAgainstThePixel/com.ultraleap.hands

openupm
https://github.com/RageAgainstThePixel/com.ultraleap.interaction-engine

I felt as though it'd be too much effort to refactor and move stuff around in the same repository since it'd be quite the breaking change anyway.

although, if you guys would like me to try to put these changes directly into this repo I can do that as well but it'll take some more time, but the hands and interaction engine packages will need their own repositories for the publishing to continue to work correctly.

Looks like upm is up and running! 🎉

I'm going to archive these repositories and remove the open upm packages to prevent confusion. Thanks again!

This issue can probably be closed now