Select to view content in your preferred language

Access ArcGIS Location component

145
1
Jump to solution
09-18-2024 06:45 AM
MatthewCorbett
New Contributor

I am trying to set the location of a GO with an attached ArcGISLocation component. When I use "this.GetComponent<ArcGISLocationComponent>().Position = new Esri.GameEngine.Geometry.ArcGISPoint(position);", I get Renderer errors that crash Unity. I've isolated the issue to that line of code, but cannot figure why it crashed game mode in Unity. Any ideas?

0 Kudos
1 Solution

Accepted Solutions
AShahbaz
Esri Contributor

Not sure what is the "position" that you are passing to ArcGISPoint, but you may create a new point like this:

new ArcGISPoint(longitude, latitude, altitude, ArcGISSpatialReference.WGS84());

or

new ArcGISPoint(x, y, z, new ArcGISSpatialReference(3857));

 

View solution in original post

1 Reply
AShahbaz
Esri Contributor

Not sure what is the "position" that you are passing to ArcGISPoint, but you may create a new point like this:

new ArcGISPoint(longitude, latitude, altitude, ArcGISSpatialReference.WGS84());

or

new ArcGISPoint(x, y, z, new ArcGISSpatialReference(3857));