- Home /
Location Services Stopped working in unity 4.0
Is there any changes to unity 4.0 Input.location and the location services interface that I need to be aware of?
My class that in 3.5 used Input.location to find the users latitude and longitude on the ipad is now spitting back bogus super large values, I cant seem to figure out why other then 4.0s location services are broken.
In xcode I also get the warning that locationServicedEnabled is depreciated.
does anyone have any light to shed on this?
Answer by Julien-Lynge · Jan 10, 2013 at 06:49 PM
I remember running across an issue that might be similar to yours. It was reported as bug 500795, and the response was that the parameter order was being mismatched internally, and to try the following order:
UnitySetLastLocation([newLocation.timestamp timeIntervalSince1970], newLocation.coordinate.latitude, newLocation.coordinate.longitude, newLocation.altitude, newLocation.horizontalAccuracy, newLocation.verticalAccuracy);
You can see the thread here: http://forum.unity3d.com/threads/159257-Unity-4.0-iOS-GPS-Fix
Also, looking at the script reference, there's an entry for isEnabledByUser - looks like they just changed the name slightly:
http://docs.unity3d.com/Documentation/ScriptReference/LocationService-isEnabledByUser.html
Your answer
Follow this Question
Related Questions
How to use Locationinfo in unity. 0 Answers
Location Service doesn't work on tablet build, does with Unity Remote 0 Answers
Location Service not starting (Android) 1 Answer
Location Services not working on LG V30? (LGE VS996) 0 Answers
How to Find location lat/long in web player (desktop, not mobile) 2 Answers