UnityEditor.Handles.DoBoneHandle C# (CSharp) Method

DoBoneHandle() static private method

static private DoBoneHandle ( Transform target ) : void
target UnityEngine.Transform
return void
        internal static void DoBoneHandle(Transform target)
        {
            DoBoneHandle(target, null);
        }

Same methods

Handles::DoBoneHandle ( Transform target, bool>.Dictionary validBones ) : void

Usage Example

示例#1
0
        private static bool DrawSkeletonSubTree(Dictionary <Transform, bool> actualBones, AvatarSetupTool.BoneWrapper[] bones, Quaternion orientation, Transform tr, Bounds bounds)
        {
            if (!actualBones.ContainsKey(tr))
            {
                return(false);
            }
            int num = 0;

            foreach (Transform tr2 in tr)
            {
                if (AvatarSkeletonDrawer.DrawSkeletonSubTree(actualBones, bones, orientation, tr2, bounds))
                {
                    num++;
                }
            }
            if (!actualBones[tr] && num <= 1)
            {
                return(false);
            }
            int num2 = -1;

            if (bones != null)
            {
                for (int i = 0; i < bones.Length; i++)
                {
                    if (bones[i].bone == tr)
                    {
                        num2 = i;
                        break;
                    }
                }
            }
            bool flag = AvatarSetupTool.GetBoneAlignmentError(bones, orientation, num2) > 0f;

            AvatarSkeletonDrawer.sPoseError |= flag;
            if (flag)
            {
                AvatarSkeletonDrawer.DrawPoseError(tr, bounds);
                Handles.color = AvatarSkeletonDrawer.kErrorColor;
            }
            else if (num2 != -1)
            {
                Handles.color = AvatarSkeletonDrawer.kHumanColor;
            }
            else if (!actualBones[tr])
            {
                Handles.color = AvatarSkeletonDrawer.kDummyColor;
            }
            else
            {
                Handles.color = AvatarSkeletonDrawer.kSkeletonColor;
            }
            Handles.DoBoneHandle(tr, actualBones);
            if (Selection.activeObject == tr)
            {
                Handles.color = AvatarSkeletonDrawer.kSelectedColor;
                Handles.DoBoneHandle(tr, actualBones);
            }
            return(true);
        }
All Usage Examples Of UnityEditor.Handles::DoBoneHandle