Facial Blendshape Count Script



public class BlendshapeCount : MonoBehaviour
{
public SkinnedMeshRenderer head;

void Start()
    {
        Mesh m = head.sharedMesh;
 
        for (int i = 0; i < m.blendShapeCount; i++)
        {
            // 遍历面部表情blendshape名字和index
            string s = m.GetBlendShapeName(i);
            if(s == bsName)
            {
                // 找某个名字
                bsNum_Show = i;
            }
 
            print("Blend Shape: " + i + " " + s); // Blend Shape: 10 face_H UU

        }
    }
}




15 次查看0 則留言

相關文章

查看全部

Unity_HeadboxVive_0308 //========= Copyright 2019, HTC Corporation. All rights reserved. ===========using System.Collections.Generic; using UnityEngine; namespace ViveSR { namespace anipal { nam

https://answers.unity.com/questions/814870/why-arent-public-variables-shown-in-the-inspector.html public variables shown in the Inspector when inheriting Class used on game object using UnityEngine;