Class IUsesCompassHeadingMethods
Inherited Members
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 |