Interface IInputGeolocation
Namespace: GameCanvas
Assembly: GameCanvas.dll
Syntax
public interface IInputGeolocation
Properties
DidUpdateGeolocationThisFrame
前回のフレーム処理以降に 位置情報イベントの更新があったかどうか
Declaration
bool DidUpdateGeolocationThisFrame { get; }
Property Value
Type | Description |
---|---|
Boolean |
GeolocationStatus
位置情報サービスの状態
Declaration
LocationServiceStatus GeolocationStatus { get; }
Property Value
Type | Description |
---|---|
LocationServiceStatus |
HasUserAuthorizedPermissionGeolocation
位置情報へのアクセス権限を取得済みかどうか
Declaration
bool HasUserAuthorizedPermissionGeolocation { get; }
Property Value
Type | Description |
---|---|
Boolean |
LastGeolocationEvent
最後に取得した位置情報イベント
Declaration
GcGeolocationEvent LastGeolocationEvent { get; }
Property Value
Type | Description |
---|---|
GcGeolocationEvent |
Methods
RequestUserAuthorizedPermissionGeolocationAsync(Action<Boolean>)
位置情報へのアクセス権限を要求します
Declaration
void RequestUserAuthorizedPermissionGeolocationAsync(in Action<bool> callback)
Parameters
Type | Name | Description |
---|---|---|
Action<Boolean> | callback | 結果を通知するコールバック |
StartGeolocationService(Single, Single)
位置情報サービスを起動します
Declaration
void StartGeolocationService(float desiredAccuracy = 10F, float updateDistance = 10F)
Parameters
Type | Name | Description |
---|---|---|
Single | desiredAccuracy | 望ましいサービス精度(メートル単位) |
Single | updateDistance | 位置情報の更新に必要な最小移動距離(メートル単位) |
Remarks
位置情報へのアクセス権限がない場合、この処理は失敗します
StopGeolocationService()
位置情報サービスを停止します
Declaration
void StopGeolocationService()
TryGetGeolocationEvent(out GcGeolocationEvent)
前回のフレーム処理以降にあった 位置情報イベントの取得を試みます
Declaration
bool TryGetGeolocationEvent(out GcGeolocationEvent e)
Parameters
Type | Name | Description |
---|---|---|
GcGeolocationEvent | e | 位置情報イベント |
Returns
Type | Description |
---|---|
Boolean | 前回のフレーム処理以降に 位置情報イベントがあったかどうか |