【发布时间】:2011-11-09 14:49:43
【问题描述】:
有没有办法通过 Unity3D 访问 android 设备上的 gps 数据?
我知道 iPhone 有“iPhoneSettings.StartLocationServiceUpdates()”。我正在为 android 寻找类似的东西。
谢谢!
【问题讨论】:
有没有办法通过 Unity3D 访问 android 设备上的 gps 数据?
我知道 iPhone 有“iPhoneSettings.StartLocationServiceUpdates()”。我正在为 android 寻找类似的东西。
谢谢!
【问题讨论】:
您可以通过以下方式访问unity3d for android设备中的gps数据:
Input.location.Start (); //start gps
// any method/member you need from Input.location like timestamp or any positional variables.
Input.location.Stop (); //stop gps (good for battery economy)
您可以参考这里了解更多信息: http://docs.unity3d.com/ScriptReference/LocationService.html
【讨论】:
根据blog post,您必须使用相同的 API:iPhoneSettings.StartLocationServiceUpdates()
【讨论】: