docs.unity3d.com
    Show / Hide Table of Contents

    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.Providers
    Syntax
    [MovedFrom("Unity.MARS")]
    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

    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

    Events

    GeoLocationChanged

    Declaration
    public event Action<GeographicCoordinate> GeoLocationChanged
    Event Type
    Type Description
    Action<GeographicCoordinate>

    Explicit Interface Implementations

    IModule.LoadModule()

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

    IModule.UnloadModule()

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

    IModuleDependency<MARSDatabase>.ConnectDependency(MARSDatabase)

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

    IModuleDependency<SlowTaskModule>.ConnectDependency(SlowTaskModule)

    Declaration
    void IModuleDependency<SlowTaskModule>.ConnectDependency(SlowTaskModule dependency)
    Parameters
    Type Name Description
    SlowTaskModule dependency
    Implements
    IModuleDependency<T>.ConnectDependency(T)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023