您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
26 行
589 B
26 行
589 B
using System.Collections.Generic;
|
|
|
|
namespace UnityEngine.Animations.Rigging
|
|
{
|
|
static class ConstraintsUtils
|
|
{
|
|
public static List<Transform> ExtractChain(Transform root, Transform tip)
|
|
{
|
|
var chain = new List<Transform>();
|
|
|
|
if (!tip.IsChildOf(root))
|
|
return chain;
|
|
|
|
Transform tmp = tip;
|
|
while (tmp != root)
|
|
{
|
|
chain.Add(tmp);
|
|
tmp = tmp.parent;
|
|
}
|
|
chain.Add(root);
|
|
chain.Reverse();
|
|
|
|
return chain;
|
|
}
|
|
}
|
|
}
|