# One project, two platforms - SteamVR and Android

**URL:** <https://forums.unrealengine.com/t/one-project-two-platforms-steamvr-and-android/399409>\
**Category:** Mobile\
**Tags:** Mobile, VR-Vive, unreal-engine, Android, Blueprint, question\
**Created:** [June 28, 2017, 6:10pm UTC](https://forums.unrealengine.com/t/one-project-two-platforms-steamvr-and-android/399409 "2017-06-28T18:10:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanielFranko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DanielFranko](https://forums.unrealengine.com/u/DanielFranko)\
**Post date:** [June 28, 2017, 6:10pm UTC](https://forums.unrealengine.com/t/one-project-two-platforms-steamvr-and-android/399409/1 "2017-06-28T18:10:14Z")

</div>

I’m working on an asymmetric 2 player game that is played over LAN. One player controls a VR pawn using HTC Vive, the other plays on an Android device.

I have the networking setup and everything works fine until I reference SteamVR anywhere in any blueprint (spawning a MotionControllerPawn, casting to BP\_MotionController, etc.). As soon as I do that the app on Android crashes with this error in the log:

- _Missing Dependency, request for SteamVRChaperoneComponent but it hasn’t been created yet_

and

- _Error: Couldn’t find file for package /Script/SteamVR requested by async loading code. NameToLoad: /Script/SteamVR_

I guess that SteamVR libraries are not being build for mobile devices which make sense but I can’t figure out how to make this work.

A bit more info:

The error is triggered by my GameMode where I spawn either a VR Pawn or a ThirdPersonCharacter after the OnPostLogin event.

What I’ve tried already:

- I tried to separate blueprints that reference VR stuff from those that should run on mobile but at some point I just had to reference VR in some shared blueprints.
- Eventually I tried to convert my Blueprint project to C++ so that I can force SteamVR to build for Android. I hoped that I’ll just add a line or two into the xxxxx.build.cs but I can see it’s not going to be that easy. So just out of desperation I tried to add android to the list of supported platforms in SteamVRPlugin.h. That surprisingly did not work 🙂

**Any chance there is a way to fix this, any help would be greatly appreciated?**

---

<div class="post-metadata">

**Author:** ![DanielFranko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DanielFranko](https://forums.unrealengine.com/u/DanielFranko)\
**Post date:** [June 29, 2017, 3:44pm UTC](https://forums.unrealengine.com/t/one-project-two-platforms-steamvr-and-android/399409/2 "2017-06-29T15:44:13Z")

</div>

OK, I think I found a way to make this work with Blueprints.

1. I made sure that I don’t mention MotionControllerPawn or BP\_MotionController in any blueprint that can potentially be accessed on the mobile device

2. Any interaction with VR is done via interfaces

3. I made a startup map where I check the type of device using GetPlatformName. Based on platform I take the player to either a VR Main Menu or mobile device menu

4. Only the VR player can create session - i.e. be the server. This helps me to decide which player should be spawned into MotionControllerPawn and which should be in a regular Character

5. I switched of the replication on MotionControllerPawn and BP\_MotionController. Only relevant to owner is set to True. Net load on client set to False.

6. I spawn and replicate meshes that stand for VR player’s hands and head. These are visible only to clients.

This seems to work fine but if there is a better way of doing this let me know please.

---

<div class="post-metadata">

**Author:** ![Neffness](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Neffness](https://forums.unrealengine.com/u/Neffness)\
**Post date:** [February 26, 2019, 4:35pm UTC](https://forums.unrealengine.com/t/one-project-two-platforms-steamvr-and-android/399409/3 "2019-02-26T16:35:04Z")

</div>

DanielFranko, I’m attempting to solve the exact same problem. Did this end up working out for you in the long run?

---

<div class="post-metadata">

**Author:** ![PRESSURE2000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PRESSURE2000](https://forums.unrealengine.com/u/PRESSURE2000)\
**Post date:** [April 3, 2022, 1:31am UTC](https://forums.unrealengine.com/t/one-project-two-platforms-steamvr-and-android/399409/4 "2022-04-03T01:31:34Z")

</div>

are you still there? anyone know how to fix this issue?
