using System; using System.Runtime.InteropServices; using UnityEngine.XR.OpenXR.NativeTypes; namespace UnityEngine.XR.OpenXR.Features.MagicLeapSupport { public partial class MagicLeapLightEstimationFeature { [System.Obsolete("Type has been relocated to new namespace. Update reference to MagicLeap.OpenXR.Features.MagicLeapLightEstimationNativeFunctions")] internal unsafe class MagicLeapLightEstimationNativeFunctions : MagicLeapNativeFunctionsBase { internal delegate* unmanaged[Cdecl] XrCreateLightEstimation; internal delegate* unmanaged[Cdecl] XrCreateLightEstimationEstimate; internal delegate* unmanaged[Cdecl] XrGetLightEstimationState; internal delegate* unmanaged[Cdecl] XrGetLightEstimationTimestamp; internal delegate* unmanaged[Cdecl] XrGetLightEstimationHDRCubemap; internal delegate* unmanaged[Cdecl] XrGetLightEstimationMainDirectionalLight; internal delegate* unmanaged[Cdecl] XrGetLightEstimationSphericalHarmonics; internal delegate* unmanaged[Cdecl] XrDestroyLightEstimationEstimate; internal delegate* unmanaged[Cdecl] XrDestroyLightEstimation; protected override void Validate() { base.Validate(); if (XrCreateLightEstimation == null) { Debug.LogError("Unable to find XrCreateLightEstimation"); } if (XrCreateLightEstimationEstimate == null) { Debug.LogError("Unable to find XrCreateLightEstimationEstimate"); } if (XrGetLightEstimationState == null) { Debug.LogError("Unable to find XrGetLightEstimationState"); } if (XrGetLightEstimationTimestamp == null) { Debug.LogError("Unable to find XrGetLightEstimationTimestamp"); } if (XrGetLightEstimationHDRCubemap == null) { Debug.LogError("Unable to find XrGetLightEstimationHDRCubemap"); } if (XrGetLightEstimationMainDirectionalLight == null) { Debug.LogError("Unable to find XrGetLightEstimationMainDirectionalLight"); } if (XrGetLightEstimationSphericalHarmonics == null) { Debug.LogError("Unable to find XrGetLightEstimationSphericalHarmonics"); } if (XrDestroyLightEstimationEstimate == null) { Debug.LogError("Unable to find XrDestroyLightEstimationEstimate"); } if (XrDestroyLightEstimation == null) { Debug.LogError("Unable to find XrDestroyLightEstimation"); } } private string SanitizeFunctionName(string input) { return $"{input.Replace("Xr", "xr")}ML"; } protected override void LocateNativeFunctions() { XrCreateLightEstimation = (delegate* unmanaged[Cdecl])LocateNativeFunction(SanitizeFunctionName(nameof(XrCreateLightEstimation))); XrCreateLightEstimationEstimate = (delegate* unmanaged[Cdecl])LocateNativeFunction(SanitizeFunctionName(nameof(XrCreateLightEstimationEstimate))); XrGetLightEstimationState = (delegate* unmanaged[Cdecl])LocateNativeFunction(SanitizeFunctionName(nameof(XrGetLightEstimationState))); XrGetLightEstimationTimestamp = (delegate* unmanaged[Cdecl])LocateNativeFunction(SanitizeFunctionName(nameof(XrGetLightEstimationTimestamp))); XrGetLightEstimationHDRCubemap = (delegate* unmanaged[Cdecl])LocateNativeFunction(SanitizeFunctionName(nameof(XrGetLightEstimationHDRCubemap))); XrGetLightEstimationMainDirectionalLight = (delegate* unmanaged[Cdecl])LocateNativeFunction(SanitizeFunctionName(nameof(XrGetLightEstimationMainDirectionalLight))); XrGetLightEstimationSphericalHarmonics = (delegate* unmanaged[Cdecl])LocateNativeFunction(SanitizeFunctionName(nameof(XrGetLightEstimationSphericalHarmonics))); XrDestroyLightEstimationEstimate = (delegate* unmanaged[Cdecl])LocateNativeFunction(SanitizeFunctionName(nameof(XrDestroyLightEstimationEstimate))); XrDestroyLightEstimation = (delegate* unmanaged[Cdecl])LocateNativeFunction(SanitizeFunctionName(nameof(XrDestroyLightEstimation))); } } } }