Search Unity

Build .exe file for WMR (Lenovo Explorer)

Discussion in 'VR' started by SimRuJ, Dec 17, 2018.

  1. SimRuJ

    SimRuJ

    Joined:
    Apr 7, 2016
    Posts:
    247
    I got a Unity 2017.3.1f1 project I want to test with my Lenovo Explorer, so I set it up as described here (with UWP). The finished build gives me a new folder with a bunch of other folders and a "myApp.sln" file for Visual Studio (I'm using version 2017) but there's no .exe file.

    If I build for "PC, Max & Linux Standalone" I get a folder that's less than half the size and includes an .exe file. To test my app I can just run the .exe file or copy it to a different PC, then run it there. Unfortunately there's no "Windows Mixed Reality" option in the XR settings if I build for "PC, Max & Linux Standalone".

    I don't want to upload the app to the Windows store or to Steam. How can I build with WMR selected in the XR settings but still get files I can easily share?
     
    Last edited: Dec 18, 2018
  2. markjanzen88

    markjanzen88

    Joined:
    May 31, 2017
    Posts:
    68
    Just use Steam VR Unity plugin if you dont want to author a native UWP app...I find this is a much easier way to develop VR projects and you will have support for HTC Vive, etc too as a bonus.
     
  3. JasonCostanza

    JasonCostanza

    Unity Technologies

    Joined:
    May 23, 2017
    Posts:
    404
    Your URL is not valid it appears so I can't follow it to comment on any information you found, but the process you describe is correct for building a UWP application. You will get a folder containing some number of sub-folder and an .sln file. Opening that sln file in Visual Studio will allow you to deploy with debugging, or create an appxpackage which can be run through WACK and later deployed to the windows store if you so choose. This method does not come with an .exe.

    @markjanzen88 has another valid solution of using SteamVR which does in fact give you the flexibility of the SteamVR platforms, like Vive for instance. Both are valid ways of going, depends on your desires.
     
  4. SimRuJ

    SimRuJ

    Joined:
    Apr 7, 2016
    Posts:
    247
    @markjanzen88
    There's no option for "SteamVR" but according to this "OpenVR" (with build type "PC, Max & Linux Standalone") is the right choice, right?
    The problem is that this requires Steam to be installed (which in turn requires an account and might be blocked in certain companies). Is there no way to get an .exe file but only use Microsoft's default "Mixed Reality" app to display everything? I don't mind losing the support for Vive or Rift, I actually only need WMR (minus HoloLens).

    @JasonCostanza
    Sorry, I changed the link.
     
  5. markjanzen88

    markjanzen88

    Joined:
    May 31, 2017
    Posts:
    68
    yes, steamvr is based on openvr. you need to get the steam vr unity plugin on the store. your right about steam being blocked at some companies but i still find this the easiest way of making an exe. going the wmr route you will end up with a native windows uwp app but i found this requires a lot more work.
     
  6. ivan20071

    ivan20071

    Joined:
    Nov 15, 2017
    Posts:
    29
    Open the solution file with VS.
    Right-click the project and choose Store->Create App Packages.
    upload_2018-12-18_23-39-53.png
    VS creates a folder that contains these files:

    upload_2018-12-18_23-44-49.png
    Copy the folder in the client machine.
    Enable side loading in the client machine.
    Run the .ps1 file in the client machine.
     
  7. SimRuJ

    SimRuJ

    Joined:
    Apr 7, 2016
    Posts:
    247
    @markjanzen88
    This one: Click? It's not installed atm but it still let me use the Explorer with Unity's play mode. The only problem I was experiencing when I tried it yesterday was that my controller/gamepad had stopped working (it did work in non-VR mode) but that might be a problem with some conflict with the VR controllers and I haven't looked into it too much anyway yet.

    @ivan20071
    Thanks for the explanation! I tried to export it that way but after 10 minutes it failed with a bunch of "dll" warnings and 3 long error message (haven't had time to google them yet). Sideloading unfortunately is also suboptimal, I really wouldn't want to make users enable developer settings just to use my app (or even make them install Steam/create an account).


    Are these (Steam VR and UWP) really the only two ways to export something for WMR that can be used directly? :/
     
  8. markjanzen88

    markjanzen88

    Joined:
    May 31, 2017
    Posts:
    68
    you might want to use a previous version of steam vr plugin (1.2.3).
    https://github.com/ValveSoftware/steamvr_unity_plugin/releases/tag/1.2.3

    valve just recently changed the input manager to something much more complex and ive had to revert some of my projects since im not a programmer and dont have the resources to work with this new system at the moment...
     
  9. SimRuJ

    SimRuJ

    Joined:
    Apr 7, 2016
    Posts:
    247
    @markjanzen88 I'm using SteamVR 1.1.4 and installed it through Steam. Not sure if I even have the plugin installed, at least there's no "SteamVR" folder in my project.

    Not sure if that's connected to it then but the input with the VR controllers is indeed a pain in the butt: Most of the buttons don't use the key codes they're supposed to use (according to the Unity documentation) and a couple are completely missing key codes (e.g. the grip button) and can't be used at all. There's a thread about that here.

    At least I got my normal controller (it's the Xbox One one) working again - you have to pay attention to what the small SteamVR window says: The controller'll only work if there's an extra green gamepad icon. My mistake the first time around was probably to have the VR controllers connected too, so I ended up getting their half-working input instead of the actual controller's.