DrawBone() public static method

public static DrawBone ( Transform transform, Bone b, float boneScale ) : void
transform UnityEngine.Transform
b Spine.Bone
boneScale float
return void
示例#1
0
        void OnSceneGUI(SceneView sceneView)
        {
            if (skeleton == null || skeletonRenderer == null || !skeletonRenderer.valid || isPrefab)
            {
                return;
            }

            var transform = skeletonRenderer.transform;

            if (showPaths)
            {
                SpineHandles.DrawPaths(transform, skeleton);
            }
            if (showConstraints)
            {
                SpineHandles.DrawConstraints(transform, skeleton);
            }
            if (showBoneNames)
            {
                SpineHandles.DrawBoneNames(transform, skeleton);
            }
            if (showShapes)
            {
                SpineHandles.DrawBoundingBoxes(transform, skeleton);
            }

            if (bone != null)
            {
                SpineHandles.DrawBone(skeletonRenderer.transform, bone, 1.5f, Color.cyan);
                Handles.Label(bone.GetWorldPosition(skeletonRenderer.transform) + (Vector3.down * 0.15f), bone.Data.Name, SpineHandles.BoneNameStyle);
            }
        }