Search Unity

Deploy Hololens App from a second machine

Discussion in 'VR' started by Ali_brown, Jul 4, 2018.

  1. Ali_brown

    Ali_brown

    Joined:
    May 28, 2018
    Posts:
    1
    Hi all

    I am fairly new to Unity and programming, so apologies for my ignorance. I have tried searching for a solution to this but cant seem to find anything to resolve my problem.

    I am using Unity 2018to create a Hololens App, i have successfully built this app and deployed it to MY Hololens on multiple occasions with no problem at all. However, i am trying to get the app onto a friends Hololens so they can test it for me, but i am having big issues when they try and build it to the headset from VS 2017.
    Here is my process:
    Build from Unity
    Zip and share the full project file (Which has the build within it)
    Unzip folder on Computer #2
    Open the APPNAME.sln file (Using Visual Studio 2017)
    Set same settings [Master] [x86] [Device] and build
    This is where i am stuck. I keep getting a varying amount of errors. The build seems to be referencing Directory paths from the original computer that i build the Unity file from. I try to edit the .sln file and CSharp project file to change any reference i can find from Computer #1 to the saved location on Computer #2 but i just clear some errors and additional errors appear.
    There also seems to be a section that refers to the Unity install on my Computer #1, which uses Unity 2018, but Computer #2 only has 2017 installed, which seems to be where i get an error where it cannot find the Unity player namespace along with a few others.

    Is there a process i am doing wrong? Should i be building it from Computer #1 a specific way to be able to deploy to devices from other machines? I dont think i will be able to go down the Windows store route as some data in the app is sensitive.
    I dont have access to Computer #2 for a few days now so cannot upload any Error/log files, but i doubt they would help as i think the issue is how i originally build it on Computer #1

    Any help is greatly appreciated, spent too many hours on this xD

    Ali
     
  2. JasonCostanza

    JasonCostanza

    Unity Technologies

    Joined:
    May 23, 2017
    Posts:
    404
    Have you installed all the necessary SDK's and everything needed for hololens development on Computer#2? it sounds like it is missing some components. https://docs.microsoft.com/en-us/windows/mixed-reality/install-the-tools

    You can deploy from Computer#1 (yours) if Hololens#2 (friend's) is on the same network, just deploy it using the IPv4 address of the Hololens. You may need to pair the Hololens during that process since they have never "shaken hands" before.
     
  3. horatiu665

    horatiu665

    Joined:
    Nov 22, 2012
    Posts:
    24
    Hey, sorry to revive this but how did you solve it eventually, @Ali_brown ?

    And a related question - what if the second target device (let's call it Hololens#3) is not on the same network? Let's say it is at the client in another country. What are other ways to build/transfer the build remotely?

    Note that Unity Cloud build cannot be used because of UWP, although that would be the nicest solution in my opinion.
     
  4. horatiu665

    horatiu665

    Joined:
    Nov 22, 2012
    Posts:
    24
    Here's a solution I found so far and I'll pursue for now:
    - setting up Device Portal on the target hololens
    - creating an app bundle from visual studio (basically same process as regular build, except final step instead of deploy to device is to create app bundle just like we were to publish it on the Microsoft Store)
    - logging on to the device from a local PC on the same wifi (I will have to ask a colleague at the location to do this) and installing the .appxbundle locally. An alternative would be somehow to put it online but I still think it is necessary to use a local PC for the installation, I don't think it can be done from the hololens alone based on what I read so far.

    I used these links to figure this out:
    https://stackoverflow.com/questions/47633839/how-can-i-deploy-an-application-to-hololens-without-vs
    https://blog.kloud.com.au/2017/10/26/hololens-using-the-windows-device-portal/

    I hope this helps someone