32 lines
797 B
C#
32 lines
797 B
C#
|
using System;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using AYellowpaper.SerializedCollections;
|
||
|
using BITKit;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace Net.Like.Xue.Tokyo
|
||
|
{
|
||
|
public class TestHumanBones : MonoBehaviour
|
||
|
{
|
||
|
[SerializeField] private SerializedDictionary<HumanBodyBones, Transform> bones;
|
||
|
|
||
|
#if UNITY_EDITOR
|
||
|
[BIT]
|
||
|
private void GetBones()
|
||
|
{
|
||
|
bones.Clear();
|
||
|
var animator = GetComponent<Animator>();
|
||
|
|
||
|
for (var i = (int)HumanBodyBones.Hips; i < (int)HumanBodyBones.LastBone; i++)
|
||
|
{
|
||
|
var bone = (HumanBodyBones)i;
|
||
|
bones.AddConflictAllowed(bone, animator.GetBoneTransform(bone));
|
||
|
}
|
||
|
}
|
||
|
#endif
|
||
|
}
|
||
|
|
||
|
}
|