|
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
using UnityEngine; |
|
|
|
using UnityEngine.Experimental.XR; |
|
|
|
using UnityEngine.Serialization; |
|
|
|
#if UNITY_IOS
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Populates the action unit coefficients for an <see cref="ARFace"/>.
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#if UNITY_IOS
|
|
|
|
|
|
|
|
ARFace m_Face; |
|
|
|
#endif
|
|
|
|
|
|
|
|
ARFace m_Face; |
|
|
|
#if UNITY_IOS
|
|
|
|
#endif
|
|
|
|
m_Face = GetComponent<ARFace>(); |
|
|
|
CreateFeatureBlendMapping(); |
|
|
|
} |
|
|
|
|
|
|
{ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#if UNITY_IOS
|
|
|
|
const string strPrefix = "blendShape2."; |
|
|
|
m_FaceArkitBlendShapeIndexMap = new Dictionary<XRArkitBlendShapeLocation, int>(); |
|
|
|
|
|
|
|
|
|
|
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.NoseSneerLeft ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "noseSneer_L"); |
|
|
|
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.NoseSneerRight ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "noseSneer_R"); |
|
|
|
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.TongueOut ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "tongueOut"); |
|
|
|
|
|
|
|
#endif
|
|
|
|
} |
|
|
|
|
|
|
|
void SetVisible(bool visible) |
|
|
|
|
|
|
|
|
|
|
void OnEnable() |
|
|
|
{ |
|
|
|
#if UNITY_IOS
|
|
|
|
if (m_ArkitFaceSubsystem == null ) |
|
|
|
{ |
|
|
|
if (m_ArkitFaceSubsystem == null) |
|
|
|
} |
|
|
|
|
|
|
|
#endif
|
|
|
|
} |
|
|
|
|
|
|
|
void OnDisable() |
|
|
|
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
#if UNITY_IOS
|
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
|
foreach (var xrFaceFeatureCoefficient in s_FaceArkitBlendShapeCoefficients) |
|
|
|
{ |
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
#endif
|
|
|
|
} |
|
|
|
} |