Proposal: MRTK assembly reduction
This proposal is a companion to #6985.
MRTK v2.x consists of a large number of assemblies, including:
- Foundation (player)
- Async
- Inspectors
- Utilities
- Core systems
- Boundary
- Camera
- Diagnostics
- Input
- Scene
- Spatial Awareness
- Teleport
- Providers
- Input Simulation
- Object mesh observer
- OpenVR
- UnityAR
- Windows Mixed Reality
- Legacy XR (2018.4)
- XR SDK (2019.3+)
- Windows Voice
- XR SDK
- Extension services
- Hand physics
- Lost tracking
- Scene transition
- SDK
- Test Utilties
- Tools
There are pros and cons to this level of granularity, including reduced re-compile time (pro) and a large number of Visual Studio projects, one per assembly (con).
This proposal describes possible manifestations of reducing the number of MRTK assemblies. Please note that most of these would require some amount of profile updates. At a minimum, guidance will be provided to describe how customers should update their profiles.
Maximum reduction
- Merge all Foundation (player) assemblies into one
- Merge all Foundation (editor) assemblies into one
- Combine all core services into
- Player assembly
- Editor assembly
- Combine all current, MRTK provided providers into
- Unity 2018.4 XR platform assembly
- Unity 2019.3+ XR platform (XR SDK) assembly
- Editor assembly
- Combine all current, MRTK provided extension services into
- Player assembly
- Editor assembly
- SDK and tools remain unchanged.
Minimum reduction
- Merge all Foundation (player) assemblies into one
- Merge all Foundation (editor) assemblies into one
- Combine all related (ex: Windows Mixed Reality) editor and inspector assemblies
Hybrid reduction
The hybrid approach would be the minimum reduction plus
- Combine all core services into
- Player assembly
- Editor assembly
Please vote (thumbs up / down) and mention your preferred reduction in the comments.
Thanks!
I am hesitating between Minimal and Hybrid one. Maybe all Core services can be merged into the same assembly as you said.
So I vote fore Hybrid
@achaperon, thank you for the feedback!
My vote would be for Minimum.
I would say the Minimum reduction ! 💯 But i do like the hybrid too ahah...
I'd go for minimum
Minimum Reduction would be my preference
Minimum reduction would be my preference as well
Closing in favor of upm packages.
reopening for further comment / evaluation
Definitely in favor of minimizing the number of vcprojs that get generated. The slowdown in dev time that is incurred by bringing mrtk into a project is significant. The hangs when opening the solution, etc. I can understand that it might not be great for the developers of mrtk to have a smaller amount assemblies, as it will slow down development time for the MRTK team. Maybe there is a way to make it so that for the MRTK team, while developing, you have the project split up into more granular assemblies, but then when you go to package it for publishing, you reduce the number. I do my best to not change MRTK as much as possible, so I wouldn't mind if it was even all in one assembly. VS (or Unity) just doesn't seem to handle the 40 or 50 projects that MRTK currently has (not using MRTK 2).
Minimum has my vote. The .csproj clutter, both in your folder and Visual Studio's Solution Explorer, makes pursuing this worth it.
Ideally we would be able to "install" MRTK in our Unity projects via the Package Manager (#5779) as either an "embedded" or "local" package, or from an npm repo or this git repo, I'm developing my own package so I have my Unity editor prefs configured to generate .csproj files for embedded packages, so even installed from the Package Manager it would be nice to still have a reduced number of assemblies/projects.
@davidkline-ms This is definitely resolved + improved by our v3 packaging strategy.
For the community: we are pursuing splitting many parts of MRTK in wholly-independent packages, which can be loaded/unloaded as the developer desires. This will cut down drastically on unneeded assemblies being loaded.