public bool TryGetLightEstimation(out MRLightEstimation lightEstimation) { if (m_SynthLightEstimation) { lightEstimation = m_SynthLightEstimation.GetData(); return(true); } lightEstimation = default(MRLightEstimation); return(false); }
void Update() { if (m_SynthLightEstimation) { var lightEstimation = m_SynthLightEstimation.GetData(); if (!m_LightEstimation.AreLightsEqual(lightEstimation)) { m_LightEstimation = lightEstimation; lightEstimationUpdated?.Invoke(m_LightEstimation); } } }
void LightEstimationUpdated(MRLightEstimation lightEstimation) { m_LastLightEstimation = lightEstimation; }
public bool TryGetLightEstimation(out MRLightEstimation lightEstimation) { lightEstimation = default(MRLightEstimation); return(true); }
public bool TryGetLightEstimation(out MRLightEstimation lightEstimation) { lightEstimation = m_LightEstimation; return(true); }
/// <summary> /// Try to get the light estimation data /// </summary> /// <param name="obj">The functionality subscriber</param> /// <param name="lightEstimation">The light estimation data</param> /// <returns>True if the operation succeeded; false if the data is not available or the feature is not supported</returns> public static bool TryGetLightEstimation(this IUsesLightEstimation obj, out MRLightEstimation lightEstimation) { return(obj.provider.TryGetLightEstimation(out lightEstimation)); }