DrawConstraints() публичный статический Метод

public static DrawConstraints ( Transform transform, Skeleton skeleton ) : void
transform UnityEngine.Transform
skeleton Spine.Skeleton
Результат 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);
            }
        }
        public void OnSceneGUI()
        {
            var skeletonRenderer = (SkeletonRenderer)target;
            var skeleton         = skeletonRenderer.skeleton;
            var transform        = skeletonRenderer.transform;

            if (skeleton == null)
            {
                return;
            }

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