docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class IUsesCompassHeadingMethods

    Inheritance
    object
    IUsesCompassHeadingMethods
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.MARS.Providers
    Assembly: Unity.MARS.Interfaces.dll
    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
    float

    The compass heading

    SubscribeHeadingUpdated(IUsesCompassHeading, Action<float>)

    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<float> headingUpdated

    The delegate to subscribe

    UnsubscribeHeadingUpdated(IUsesCompassHeading, Action<float>)

    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<float> headingUpdated

    The delegate to unsubscribe

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)