コード例 #1
0
 private Animation.BoneData CreateBone(UnityEngine.Transform transform)
 {
     Animation.BoneData bone = new Animation.BoneData();
     bone.Name = transform.name;
     foreach (Transform t in transform)
     {
         bone.Add(CreateBone(t));
     }
     return(bone);
 }
コード例 #2
0
 private void UpdateSkeleton()
 {
     if (_RootField.Object != null)
     {
         Skill.Editor.Animation.BoneData root = CreateBone(_RootField.Object, string.Empty);
         SkinMeshData skin = _Data.Load();
         skin.Root = root;
         _Data.Save(skin);
     }
 }
コード例 #3
0
 /// <summary>
 /// Check whether specyfied bone is in hierarchy or unused
 /// </summary>
 /// <param name="bone">Bone to check</param>
 /// <returns>True if is in hierarchy, otherwise false</returns>
 public bool IsInHierarchy(BoneData bone)
 {
     return(IsInHierarchy(Root, bone));
 }