From the course: Unity: Integrating GPS and Points of Interest

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Create a visual GUI placeholder

Create a visual GUI placeholder

Now what I actually want to do is if I just switch back to Unity for a second, here we go, there we go, I want to on the game view here, the camera will kick in, but down at the bottom on the left and on the right I want to display the longitude and latitude of my current location. which will hold the longitude and latitude locations. So these will be public, well public static floats, actually. There we go. And what we're going to do is just have one called longitude. There we go. And we also want to hold the latitude. There we go and there we go. Everything should be fine. Now that means that we can access these here from another script and down at the bottom they will actually be overwritten here within the class. Every time the script dates based on the distance in meters that we walked which in my particular case I selected 10 meters and then to update the longitude and latitude. Now to access this script what I'm going to do is I'm also going to make a public version of this GPS…

Contents