using UnityEngine.XR.OpenXR.NativeTypes; namespace MagicLeap.OpenXR.Features.FacialExpressions { internal unsafe class FacialExpressionNativeFunctions : NativeFunctionsBase { internal delegate* unmanaged [Cdecl] XrCreateFacialExpressionClient; internal delegate* unmanaged [Cdecl] XrDestroyFacialExpressionClient; internal delegate* unmanaged [Cdecl] XrGetFacialExpressionBlendShapeProperties; private string SanitizeName(string name) => $"{name.Replace("Xr", "xr")}ML"; protected override void LocateNativeFunctions() { XrCreateFacialExpressionClient = (delegate* unmanaged[Cdecl])LocateNativeFunction(SanitizeName(nameof(XrCreateFacialExpressionClient))); XrDestroyFacialExpressionClient = (delegate* unmanaged[Cdecl])LocateNativeFunction(SanitizeName(nameof(XrDestroyFacialExpressionClient))); XrGetFacialExpressionBlendShapeProperties = (delegate* unmanaged[Cdecl])LocateNativeFunction(SanitizeName(nameof(XrGetFacialExpressionBlendShapeProperties))); } } }