Class UsesLightEstimationMethods
Extension methods for light estimation users
Namespace: Unity.MARS.Providers
Syntax
public static class UsesLightEstimationMethods : object
Methods
SubscribeLightEstimationUpdated(IUsesLightEstimation, Action<MRLightEstimation>)
Subscribe to the lightEstimationUpdated event, which is invoked when the light estimation changes
Declaration
public static void SubscribeLightEstimationUpdated(this IUsesLightEstimation obj, Action<MRLightEstimation> lightEstimationUpdated)
Parameters
Type | Name | Description |
---|---|---|
IUsesLightEstimation | obj | The functionality subscriber |
Action<MRLightEstimation> | lightEstimationUpdated | The action which will be invoked when light estimation changes |
TryGetLightEstimation(IUsesLightEstimation, out MRLightEstimation)
Try to get the light estimation data
Declaration
public static bool TryGetLightEstimation(this IUsesLightEstimation obj, out MRLightEstimation lightEstimation)
Parameters
Type | Name | Description |
---|---|---|
IUsesLightEstimation | obj | The functionality subscriber |
MRLightEstimation | lightEstimation | The light estimation data |
Returns
Type | Description |
---|---|
Boolean | True if the operation succeeded; false if the data is not available or the feature is not supported |
UnsubscribeLightEstimationUpdated(IUsesLightEstimation, Action<MRLightEstimation>)
Unsubscribe to the lightEstimationUpdated event, which is invoked when the light estimation changes
Declaration
public static void UnsubscribeLightEstimationUpdated(this IUsesLightEstimation obj, Action<MRLightEstimation> lightEstimationUpdated)
Parameters
Type | Name | Description |
---|---|---|
IUsesLightEstimation | obj | The functionality subscriber |
Action<MRLightEstimation> | lightEstimationUpdated | An action which was previously subscribed to lightEstimationUpdated |