Mixedrealitytoolkit-unity: Support 2018.3 Unity Package Manager

Created on 16 May 2019  路  6Comments  路  Source: microsoft/MixedRealityToolkit-Unity

Describe the problem

Importing MRTK via .unitypackages is always painful since it pulls it straight into the Assets folder.

Describe the solution you'd like

Unity 2018 supports Unity Packages through the UPM system. 2018.3 does not support repos outside of Unity's own package repo but it does support local packages through the UI.

Describe alternatives you've considered

I know we are planning to support Nuget but it looks like that might still be a little ways away?

Additional context

I already have a PR + Azure Pipeline working for this...

Feature Request Package Management

Most helpful comment

My thoughts on this as a UPM user:

1: I think this is a bug or missing feature from Unitys side. You can pull assets from a package with the filebrowser to a field no problem, its just the pop up pickers that dont list them.

2: Audio not importing was a bug. It is fixed in 2019.1. We have TMP ui and fonts in a package. It works fine, its only the TMP essentials that has to be imported in each consuming project (if even that).

3: Unity store will be moved to UPM once it is mature and they have a conversion guide/tooling ready. Unitypackaged will die. It may still be a long time away, but you should keep it in mind.

4: I dont want examples in my production project :) It is easy to just fork the MRTK repo to play with examples or experimental features.

All 6 comments

This is not GA blocking. we can do this after GA.

Alrighty, let's use this issue to get feedback on UPM support + desire to get it going forward. I spent some time last month trying this out (based on the work that happened in this PR: https://github.com/microsoft/MixedRealityToolkit-Unity/pull/4616) - for the most part things were good, but there were a few issues with UPM + MRTK in general where we didn't have time in the current iteration to release with quality.

There are a few issues when consuming MRTK in UPM:
1) Pickers (i.e. the very basic thing that shows up when you try to select a profile) don't show assets in the UPM package location. I assume this is because of a distinction where assets in the Packages location are intended to be immutable (or maybe this is unrelated, but a side effect). So to work around this we'd either have to reimplement a picker, or more probably have some sort of code import step like text mesh pro (and then figure out how to do versioning between things)
2) Certain types of assets (like audio) can't be referenced from your scene directly if the audio file is in the packages folder. Similar to 1), this would mean we'd probably have to do the text mesh pro import for the set of asset types that need this behavior.
3) This would bifurcate the development process for folks using MRTK using as sources or compiled binaries. so we'd need to figure out if there is a single flow that we could support, or how we support now the two different ways of consuming it (i.e. do people who grab .unitypackages or compiled binaries also need to do this update?)
4) Example scenes can't be directly opened in when in the packages/ folder, meaning again 1) is necessary in order to copy things over (similar to text mesh pro)

If none of those things 1-4 are interesting to consumers (i.e. they just want the code directly) then consuming as UPM does work fine. I ultimately opted to not do the half-way work here because I'd ideally be able to push out a story that worked well end to end (and 1-4 prevent it from working well end to end)

My thoughts on this as a UPM user:

1: I think this is a bug or missing feature from Unitys side. You can pull assets from a package with the filebrowser to a field no problem, its just the pop up pickers that dont list them.

2: Audio not importing was a bug. It is fixed in 2019.1. We have TMP ui and fonts in a package. It works fine, its only the TMP essentials that has to be imported in each consuming project (if even that).

3: Unity store will be moved to UPM once it is mature and they have a conversion guide/tooling ready. Unitypackaged will die. It may still be a long time away, but you should keep it in mind.

4: I dont want examples in my production project :) It is easy to just fork the MRTK repo to play with examples or experimental features.

@yacuzo all valid points - a little more background, at the time it was ~2 weeks before GA and it was better to not push out something that was half baked. I think that this is definitely something that we're getting more signal on, and now that we've enumerated the things that need to be changed (also also now that the github package registry is a thing), it seems like a lot of the stars have aligned here on it being the right time to move on this.

@wiwei Any Updates on when this might be released? Specifically looking to move to pulling MRTK UPM packages directly from git

UPM is now supported in MRTK 2.5 and Unity 2019.4.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jimstack picture jimstack  路  3Comments

overedge picture overedge  路  3Comments

nrchuanqi picture nrchuanqi  路  3Comments

dustin2711 picture dustin2711  路  3Comments

Alexees picture Alexees  路  3Comments