Search code examples
mrtk

How do I setup a single application for cross platform deployment using MRTK?


I am trying to build an application (converting rather), that builds into a server (UNET/ Mirror wise), a windows client, Oculus Go client and UWP client. More platforms will be implemented in the future.
Unless I did not tackle this the right way, the Toolkit does not seem to be capable of doing this with just one profile, or maybe not at all.
E.g.: I need the mouse for Windows and motion controllers for UWP. Having both in the MixedRealityInputSystemProfile spawns both on UWP. If I don't add the mouse I have nothing on Windows Standalone. This leads me to the conclusion that I have to create multiple profiles. But the MixedRealityToolkit only references a single one. Does that mean I have to additively load a different Toolkit with it's configuration for any platform configuration I want?
The DefaultMixedRealityInputSystemProfile already contains a lot of inputs, which makes me think it should be capable of doing that, but it looks like it does so to a certain degree and then fails.

Thinking further about this:
What if I want an UWP app, but for MR Portal only, or for UWP Standalone only. What about Oculus Go (Android) and Android mobile? The differentiation would be using the Oculus SDK under Android. Using it under windows would result in the Rift being used I guess.

Where do I branch off what?


Solution

  • I believe you can specify which input providers you want on different platforms. For example, if you want a MouseProvider in Windows only, the you can specify the Mouse Input Data Provider to run only on Windows via the “supported platforms” field of the mouse data provider.

    Similarly you can enable the motion controllers using same technique.

    While there are not yet ways to specify completely different configurations for different platforms, it is possible to solve your specific case of input by configuring the input data providers.