Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Publish Remote Host Application in Unity for Hololens

Discussion in 'VR' started by Pointcloud, Apr 26, 2017.

  1. Pointcloud

    Pointcloud

    Joined:
    Nov 24, 2014
    Posts:
    37
    I've successfully built the Remote Hosting companion demo in visual studio and ran it on my hololens from my PC, very cool! I'm wondering if there is a way to publish an application that supports remote hosting in Unity as well. I can run remote hosting in the unity editor but cannot seem to find a way to publish a self-contained application with this feature. If that is at all possible it would be great because my preference is to develop in Unity! Thanks for your help!
     
    HosseinArabbeigi likes this.
  2. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
  3. Pointcloud

    Pointcloud

    Joined:
    Nov 24, 2014
    Posts:
    37
    How / where would I place that code in the Visual Studio project? I'm not sure if the code windows provides is even compatible with what Unity generates. It would be preferable to be able to publish an application straight out of Unity with Remote Host support for Hololens.
     
  4. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    There is a link at the bottom of the page I linked above. It shows the git hub that as a example of to use it.
     
  5. Pointcloud

    Pointcloud

    Joined:
    Nov 24, 2014
    Posts:
    37
    I can get their example to work, however it wasn't made with Unity, it seems to be written entirely in C++. I'm curious about how I would implement the code into the VS build published out of Unity. I assume that I would have to properly copy and place all of the code into the correct locations of the VS project published from Unity, which requires a bit of reverse engineering how Unity publishes to VS. Is there a way to publish an app in Unity with Remote Host built in for Hololens without having to manually go in and edit the VS file it outputs?
     
  6. jose-araujo

    jose-araujo

    Joined:
    Nov 17, 2016
    Posts:
    34
    Hi @Pointcloud, I think you are trying to do the same thing as I posted in this thread https://forum.unity3d.com/threads/h...ith-another-application.467358/#post-3048635?

    I also needed to enable remoting from a desktop to the Hololens in order to show Unity content from a Desktop in the Hololens, but did not want to use the Unity holographic remoting app to do so since it does not allow other applications to run in parallel in the Hololens when that is running. Is that your goal as well?
     
  7. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
  8. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    This might be helpful I think is more of what you might want.

    https://github.com/Microsoft/HoloLensCompanionKit/blob/master/RemotingHostSample/README.md

    Holographic Remoting Host
    This code sample shows how to create a desktop or UWP app that provides holographic content via remoting.

    Holographic remoting allows your app to host holographic content on a desktop PC, or on a UWP device such as the XBox One, allowing access to more system resources and making it possible to integrate holographic views into existing desktop PC software. This code sample includes desktop, UWP, and UWP XAML projects that all provide remoting content.

    This code sample demonstrates the following features that are required for a holographic remoting host:

    • Establishes a connection with the HoloLens
    • Receives a data stream with input from a HoloLens
    • Renders content in a virtual holographic view
    • Streams content frames back to the HoloLens in real-time
    For more info, see the holographic remoting documentation.
     
  9. abuklea

    abuklea

    Joined:
    Mar 2, 2013
    Posts:
    13
    Hi @Unity_Wesley .. yes the RemotingHostSample works as expected. However as @Pointcloud has mentioned.. these demo apps are not built using Unity, but rather as standalone apps in C++.

    I am also having trouble building a standalone UWP app from Unity, to run on a Windows 10 PC.. and connect to a HoloLens via holographic remoting. I am getting the error "InvalidOperationException: Enable VR Streaming to allow connection to remote holographic device". It seems it could be an issue with the ordering of connecting to the WindowsMR devices and connecting to the HolographicRemoting service.. however no matter what order I do this in the remoting will not work. Calling XRSettings.LoadDeviceByName("WindowsMR"); first, before connecting to the remoting services does not work. And connecting the remoting (with HolographicRemoting.Connect) before loading the WindowsMR device results in the error above.

    It is not at all clear from the Unity or the Microsoft remoting documentations how to build a standalone UWP app from Unity to connect to a HoloLens via holographic remoting.

    Please see the question I have posted here: https://answers.unity.com/questions/1566982/how-to-enable-vr-streaming-unity-uwp-hololens-remo.html

    Currently this question has almost 200 followers, but so far no response... are you able to comment on this issue please?

    Thanks for any help you can provide! Cheers
     
  10. abuklea

    abuklea

    Joined:
    Mar 2, 2013
    Posts:
    13
    @Unity_Wesley I have narrowed the issues I was having down to including the "None" entry in Virtual Reality SDKs list under XR Settings. If I have only the "Windows Mixed Reality" entry in the list then everything works as expected. As soon as I add "None" (either before or after the WindowsMR entry), the remoting connects to the HoloLens, the remoting window disappears on the hololens, however my application does not appear on the device (blank display). If I remove "None" it works again.

    See my full update to my question here: https://answers.unity.com/questions/1566982/how-to-enable-vr-streaming-unity-uwp-hololens-remo.html

    @Pointcloud are you seeing this same issue?