Select to view content in your preferred language

ArcGIS Unity SDK

863
4
12-11-2023 03:11 AM
FTayyab82
Emerging Contributor

Hi All,

I am starting out with ArcGIS Unity SDK however all samples seem to make use of online services with API. I want to (if it is possible) to display layers in VR which are locally loaded as part of Unity Project.

Basically my questions are:

1. How data/terrain layer can be prepared, packaged and utilized as terrain in a Unity VR project without the need to retrieve data from AGOL or Enterprise using API.

2. Is it possible to display ESRI terrain layer with custom Unity terrain layer underneath.

Any samples of examples will be appreciated.

0 Kudos
4 Replies
ChrisAnderson7
Emerging Contributor
Have you tried just using the local file path? It's been a while, but I had that working with local 3dScenes before unless Esri changed something.
0 Kudos
MasonGaw
Regular Contributor

Hi there, 
It is possible to use local packages for VR in order to avoid the need for an online connection to access the API. Please refer to this link on how to use application.persistentdatapath(). You will need to use application.persistentdatapath + "name of package". Please refer to this script attached on how to properly set it up. The script I attached needs to be attached to the Game Object that has the ArcGISMap Component attached to it. You should only need to change names of the packages and the type of data/layer. (You mentioned terrain specifically. However you can refer to this for adding basemap, terrain, and other layers as well.)

As for the second part of your question, I don't believe it is possible. You can definitely have both in the scene at the same time, but using custom terrain made in Unity as a terrain layer with the Maps SDK I don't believe is possible. You can always use the terrain provided with the Maps SDK and enable mesh colliders if you are looking for collisions with the SDK. I didn't answer your second question, please let me know and I'm happy to answer again. 
Hope this helps,
Mason

0 Kudos
FTayyab82
Emerging Contributor

Hi MasonGaw,

Thank you for the detailed reply. I will give it a try. For the second part, I want to display a terrain layer representing subsurface below ESRI basemap or terrain. It seems it should work but maybe not, just wondererd if someone tried it.

 

Thank you

0 Kudos
MasonGaw
Regular Contributor

I don't believe anyone on the team has tried it. Do give it a shot and let me know if it works!

Mason 

0 Kudos