文档

Unity Engine

Unity Engine

Stop()

Stops location service updates. This is useful to save battery power when the application doesn't require the location service.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.InputLegacyModule
public void Stop()

Remarks

Do not drive the location service from both this legacy API and the Input System
LocationSensor
in the same project. Both share the same underlying platform location service, so stopping it here also stops updates for the
LocationSensor
(and vice versa). Use a single location API per project.