Skip to main content
Version: 20 Mar 2024

MagicLeapFacialExpressionNativeBindings.cs

Source code

// %BANNER_BEGIN%
// ---------------------------------------------------------------------
// %COPYRIGHT_BEGIN%
// Copyright (c) (2019-2023) Magic Leap, Inc. All Rights Reserved.
// Use of this file is governed by the Software License Agreement, located here: https://www.magicleap.com/software-license-agreement-ml2
// Terms and conditions applicable to third-party materials accompanying this distribution may also be found in the top-level NOTICE file appearing herein.
// %COPYRIGHT_END%
// ---------------------------------------------------------------------
// %BANNER_END%

#if UNITY_OPENXR_1_9_0_OR_NEWER
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using UnityEngine;
using UnityEngine.XR.MagicLeap;
using UnityEngine.XR.MagicLeap.Native;
using UnityEngine.XR.OpenXR.NativeTypes;

namespace UnityEngine.XR.OpenXR.Features.MagicLeapSupport
{
public partial class MagicLeapFacialExpressionFeature
{
internal partial class NativeBindings : MagicLeapNativeBindings
{
[DllImport(MagicLeapXrProviderNativeBindings.MagicLeapXrProviderDll, CallingConvention = CallingConvention.Cdecl)]
public static extern XrResult MLOpenXRCreateFacialExpressionClient(uint requestedCount, FacialBlendShape[] requestedFacialBlendShapes, out ulong facialExpressionClient);

[DllImport(MagicLeapXrProviderNativeBindings.MagicLeapXrProviderDll, CallingConvention = CallingConvention.Cdecl)]
public static extern XrResult MLOpenXRDestroyFacialExpressionClient(ulong facialExpressionClient);

[DllImport(MagicLeapXrProviderNativeBindings.MagicLeapXrProviderDll, CallingConvention = CallingConvention.Cdecl)]
public static extern XrResult MLOpenXRGetFacialExpressionBlendShapesInfo(ulong facialExpressionClient, uint blendShapeCount, [In, Out] BlendShapeProperties[] blendShapes);
}
}
}
#endif