docs.unity3d.com
    显示 / 隐藏目录

    Class GeoLocationModule

    Inheritance
    Object
    ScriptableSettingsBase
    ScriptableSettingsBase<GeoLocationModule>
    ScriptableSettings<GeoLocationModule>
    GeoLocationModule
    Inherited Members
    ScriptableSettings<GeoLocationModule>.instance
    ScriptableSettingsBase<GeoLocationModule>.k_HasCustomPath
    ScriptableSettingsBase<GeoLocationModule>.s_Instance
    ScriptableSettingsBase<GeoLocationModule>.Save(String)
    ScriptableSettingsBase<GeoLocationModule>.GetFilePath()
    ScriptableSettingsBase.k_PathExceptionMessage
    ScriptableSettingsBase.GetInstanceByType(Type)
    ScriptableSettingsBase.OnLoaded()
    Namespace: Unity.MARS
    Syntax
    [ScriptableSettingsPath("Assets/MARS/UserSettings")]
    [ModuleOrder(1073741824)]
    public class GeoLocationModule : ScriptableSettings<GeoLocationModule>, IModuleDependency<MARSDatabase>, IModuleDependency<SlowTaskModule>, IModule

    Fields

    MaxLatitude

    Declaration
    public const float MaxLatitude = 90F
    Field Value
    Type Description
    Single

    MaxLongitude

    Declaration
    public const float MaxLongitude = 180F
    Field Value
    Type Description
    Single

    Properties

    continuousUpdates

    When enabled, the location service will continue to poll for updates after acquiring initial location

    Declaration
    public bool continuousUpdates { get; set; }
    Property Value
    Type Description
    Boolean

    Methods

    ConnectDependency(MARSDatabase)

    Declaration
    public void ConnectDependency(MARSDatabase dependency)
    Parameters
    Type Name Description
    MARSDatabase dependency
    Implements
    IModuleDependency<T>.ConnectDependency(T)

    ConnectDependency(SlowTaskModule)

    Declaration
    public void ConnectDependency(SlowTaskModule dependency)
    Parameters
    Type Name Description
    SlowTaskModule dependency
    Implements
    IModuleDependency<T>.ConnectDependency(T)

    LoadModule()

    Declaration
    public void LoadModule()
    Implements
    IModule.LoadModule()

    SetCurrentLocationAndUpdateTrait(GeographicCoordinate)

    Given a GeographicCoordinate, immediately update the GeoLocationModule and MARS database with it

    Declaration
    public void SetCurrentLocationAndUpdateTrait(GeographicCoordinate location)
    Parameters
    Type Name Description
    GeographicCoordinate location

    TryGetGeoLocation(out GeographicCoordinate)

    Declaration
    public bool TryGetGeoLocation(out GeographicCoordinate coordinate)
    Parameters
    Type Name Description
    GeographicCoordinate coordinate
    Returns
    Type Description
    Boolean

    TryStartService()

    Declaration
    public bool TryStartService()
    Returns
    Type Description
    Boolean

    UnloadModule()

    Declaration
    public void UnloadModule()
    Implements
    IModule.UnloadModule()

    Events

    GeoLocationChanged

    Declaration
    public event Action<GeographicCoordinate> GeoLocationChanged
    Event Type
    Type Description
    Action<GeographicCoordinate>
    返回到顶部
    Copyright © 2023 Unity Technologies — 商标和使用条款
    • 法律条款
    • 隐私政策
    • Cookie
    • 不要出售或分享我的个人信息
    • Your Privacy Choices (Cookie Settings)