Find the best matching blend shape for each facial expression based on their names.
Use this function to create an association between a SkinnedMeshRenderer's blend shapes and
OVRFaceExpressions.FaceExpression values.This function tokenizes face expression enum strings and blend shape name strings in order to find an array of
OVRFaceExpressions.FaceExpression to the blend shapes of a model. It quantifies the quality of the match by the total number of characters in the matching tokens. Furthermore, it requires at least a total of more than 2 characters to match, to avoid matching just single characters. A better technique might be to use Levenshtein distance to match the tokens to allow some typos while still being allowing flexibility with respect to the order of tokens.
ParametersskinnedMeshThe mesh to find a mapping for.
blendShapeNamesArray of blend shape names.
faceExpressionsArray of
id for mapping to them.ParametersallowDuplicateMappingWhether to allow duplicate mapping or not
ReturnsReturns an array of
OVRFaceExpressions.FaceExpression of the same length as the number of blend shapes on the skinnedMesh , with each element identifying the closest match found.