Class IUsesCompassHeadingMethods
Namespace: Unity.MARS.Providers
Syntax
public static class IUsesCompassHeadingMethods : object
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 |