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

    Class IUsesCompassHeadingMethods

    Inheritance
    Object
    IUsesCompassHeadingMethods
    Namespace: Unity.MARS
    Syntax
    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

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