I am trying to build upon the introductory Map Creator UI tutorial and deploy the project into a Hololens2 device. I am adding the MRTK XR Rig and it is conflicting with the ArcGISCamera so that I am not able to see the map content in Play mode or when I build and deploy to the Hololens 2.
Has anyone successfully configured a Unity project for Hololens 2 with MRTK3 and the ArcGIS SDK? My goal is to build a scene that can be displayed as a table top view of a map scene that I can walk around.
You should remove the camera component from ArcGISCamera so that the XR rig camera is used for the rendering. However, ArcGISCamera is used for loading the map tiles, so you need to keep it in the scene and orient it toward the map. For a tabletop setup, this could be above the map, pointing downward (i.e., the ArcGISLocation component of ArcGISCamera has the same position as the map origin and a rotation of 0,0,0)
In case you didn't know, there is a a tabletop sample included in the plugin. I haven't tested this scene with a hololens but it could give you some clues about the camera setup and possible functionality for zooming and panning
Something else, when you remove the Camera component from ArcGISCamera, the values for FoV and viewport under ArcGIS Camera component will likely fall back to 0, so make sure to set them to something meaningful (possibly those from the camera of the XR rig)
Thanks, both comments have been helpful. I reviewed the TableTop sample and added the TableTop Prefab into a scene with an MRTK XR Rig. I have successfully deployed the app to my Hololens2 device. See the attached image for my Hierarchy.
I do have a question about spatial referencing. I cannot change WKID from 3857 in the ArcGIS Map component, it keeps returning to the default value of 3857...where is that stored and how can I change it?
I also noticed that position is set in several places:
How do these positions interact?
Glad to hear it is working.
You should be able to set the spatial reference through the ArcGIS Map Component or the Map Creator UI (under Tools > ArcGIS Maps SDK) and there shouldn't be any difference. Usually when the wkit is not recognized/supported it should fall back to 4326 (3857), so I am a bit surprised that it defaults to 3857.
It may be that the basemap layer is not compatible with the spatial reference you are using? Since the tabletop uses a local map (flat earth), 3857, or a projected SR likely works best.
TabletopMap Prefab is generally used as a wrapper to be able to move the map in the scen or relative to the "table".
In general, the origin of the map component and the location of arcgis camera are largely independent, besides rebasing. In the tabletop, the map component origin and arcgis camera location are changing together to keep the arcgis camera centered above the map extent. So as you pan the map, the origin of the map component, the center of the extent, and the location of the arcgis camera all change in sync. And as you zoom, the map extent changes and the arcgis camera moves up and down to simulate the scale/load the appropriate LoDs.
The location that i refer to here is the position of the arcgis location component or the origin or the arcgis map. These locations are used position the map and geolocated objects at their correct location in the unity scene.
Hope this clarifies it somewhat.