docs.unity3d.com
    Show / Hide Table of Contents

    Class IUsesCompassHeadingMethods

    Inheritance
    Object
    IUsesCompassHeadingMethods
    Namespace: Unity.MARS.Providers
    Syntax
    [MovedFrom("Unity.MARS")]
    public static class IUsesCompassHeadingMethods

    Methods

    GetHeading(IUsesCompassHeading)

    Get the current compass heading

    Declaration
    public static float GetHeading(this IUsesCompassHeading obj)
    Parameters
    Type Name Description
    IUsesCompassHeading obj
    Returns
    Type Description
    Single

    The compass heading

    SubscribeHeadingUpdated(IUsesCompassHeading, Action<Single>)

    Subscribe to the headingUpdated event, which is called when the compass heading changes

    Declaration
    public static void SubscribeHeadingUpdated(this IUsesCompassHeading obj, Action<float> headingUpdated)
    Parameters
    Type Name Description
    IUsesCompassHeading obj
    Action<Single> headingUpdated

    The delegate to subscribe

    UnsubscribeHeadingUpdated(IUsesCompassHeading, Action<Single>)

    Unsubscribe from the headingUpdated event, which is called when the compass heading changes

    Declaration
    public static void UnsubscribeHeadingUpdated(this IUsesCompassHeading obj, Action<float> headingUpdated)
    Parameters
    Type Name Description
    IUsesCompassHeading obj
    Action<Single> headingUpdated

    The delegate to unsubscribe

    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