docs.unity3d.com
    Show / Hide Table of Contents

    Class GeoLocationModule

    Inheritance
    Object
    GeoLocationModule
    Namespace: Unity.MARS.Providers
    Syntax
    public class GeoLocationModule : ScriptableSettings<GeoLocationModule>, IModuleDependency<MARSDatabase>, IModuleDependency<SlowTaskModule>, IModuleBuildCallbacks

    Fields

    MaxLatitude

    Declaration
    public const float MaxLatitude = null
    Field Value
    Type Description
    Single

    MaxLongitude

    Declaration
    public const float MaxLongitude = null
    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>
    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