Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unity3d Input.location from documentation not available in code

I am working on a Unity3d for Android project. Using the documentation from Unity:

http://unity3d.com/support/documentation/ScriptReference/Input-location.html

I should be able to use Input.location to get access to GPS location data. But instead I get an error basically telling me the Input.location is not part of Unity.

Assets/Scripts/Prototype1.js(27,29): BCE0019: 'location' is not a member of 'UnityEngine.Input'.

I've checked for updates and it tells me the system is fully up to date. I'm running version 3.4.2f3

Is the documentation outdated? Is there a different reference to the LocationService? How can I get the location data?

like image 826
CLo Avatar asked Jun 29 '26 02:06

CLo


1 Answers

The files at unity3d.com contain the documentation for the most recent release Unity3D 3.5. If you look at your documentation in the local file system you won't find Input.location. Seems like they have changed the interface in Unity3D 3.5.

I haven't used GPS until now, maybe this thread and the links provided can throw some light on this:

How to import GPS location coordinates from Android device?

like image 60
Kay Avatar answered Jun 30 '26 17:06

Kay



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!