Search Unity

SpectatorView preview for Unity 2018.2+

Discussion in 'VR' started by davidjbain, Oct 4, 2018.

  1. davidjbain

    davidjbain

    Joined:
    May 8, 2018
    Posts:
    7
    Hello everyone,

    I am using the spectator view preview version with the iphone. I got it to work in Unity 2017.4.12.f1

    https://docs.microsoft.com/en-us/windows/mixed-reality/spectator-view

    I downloaded the latest mixedrealitytoolkit htk_development branch.
    https://github.com/Microsoft/MixedRealityToolkit-Unity/tree/htk_development

    I copied the dll files into Assets\HoloToolkit-Preview\SpectatorView\Plugins\WSA\x86

    Opened up the spectatorViewExample scene, built it for the hololens, then the iphone in the same session. Got it to work great!

    My issue is that I have to use unity version 2018.2.7f1 to incorporate it into another project. I tried following the same steps for this version of unity. When I build it to the hololens, I get the unity logo, and then nothing afterwords. I looked at the errors, and it appears the SpectatorViewPlugin.dll is not being found or loaded. I made sure I put it in the same exact place, and I made the build settings all the same.

    I was wondering if anyone had any ideas of what I could try to get it to work.

    Thanks
     
  2. davidjbain

    davidjbain

    Joined:
    May 8, 2018
    Posts:
    7
    Figured it out. In the new version of unity, you can't just add the dll files, you also have to navigate to them in the unity editor, click on them, and apply the settings. Now it recognizes the dll files and the app runs!
     
    JasonCostanza likes this.
  3. euphoricash13

    euphoricash13

    Joined:
    Mar 20, 2015
    Posts:
    4
    Hi David,
    I guess you got the spectator view preview working. I'm able to run the example and replaced the star with different model. I found that both are not synchronized. It seems as if the iPad had its own version of the app running and anything I do on the Hololens is not being reflected there. I selected the Hololens version as server in the WorldSync game object and iOS version as local player authority. I think it's not necessary to connect the devices to my system that's running the unity project right ?. For now only my Hololens and iPad are connected in the same network.

    Thanks in advance
     
  4. davidjbain

    davidjbain

    Joined:
    May 8, 2018
    Posts:
    7
    Hi Robin,

    So did you test with just the star first? See if just the star syncs. You need to make both builds in the same unity session, make sure you take out the GTLF files for the ios build and put them back in for the hololens build.

    If the star works than you are just having an issue syncing your variables. The script attached to the star shows how they synced the color changing of the star. If syncing is the issue just look up some UNET tutorials. I think this is the one I used https://unity3d.com/learn/tutorials...ion-simple-multiplayer-example?playlist=29690


    BTW I actually had to revert to 2018.1.9, there is a camera issue with Unity 2018.2 and the hololens https://forum.unity.com/threads/hololens-photo-capturing-failing.548845/
     
  5. chauBV

    chauBV

    Joined:
    Jan 23, 2018
    Posts:
    1
    Hi David,
    I have the same issue with Robin. I was able to build the spectator view example to hololens and iphone X, but the two apps don't sync. I used the same instance of unity to build two apps (2017.4.10 in my case), but ported to hololens on a pc and ios on a mac. The Hololens and the iphone connected to the same network.
    Thanks
     
  6. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,983
    We also have the same issue.
     
  7. euphoricash13

    euphoricash13

    Joined:
    Mar 20, 2015
    Posts:
    4
    I forgot to update here. I got it working. As david mentioned we need to tinker the SyncVars and NetworkTransforms. We gotta treat it like a multiplayer game that uses Unet. Try this out. Add two hand manipulation script from HoloToolkit on the Hologram also search NetworkTransform, NetworkIdentity scripts in the inspector and add that as well. Now when you build and run, move the Hologram in HoloLens version and the position of the hologram gets updated in the iOS device as well.

    For more watch this: