void DoRenderPreview(bool drawHandles) { GameObject go = this.m_previewInstance; if (m_requireRefresh && go != null) { go.GetComponent <Renderer>().enabled = true; if (!EditorApplication.isPlaying) { m_skeletonAnimation.Update((Time.realtimeSinceStartup - m_lastTime)); } m_lastTime = Time.realtimeSinceStartup; if (!EditorApplication.isPlaying) { m_skeletonAnimation.LateUpdate(); } if (drawHandles) { Handles.SetCamera(m_previewUtility.m_Camera); Handles.color = m_originColor; Handles.DrawLine(new Vector3(-1000 * m_skeletonDataAsset.scale, 0, 0), new Vector3(1000 * m_skeletonDataAsset.scale, 0, 0)); Handles.DrawLine(new Vector3(0, 1000 * m_skeletonDataAsset.scale, 0), new Vector3(0, -1000 * m_skeletonDataAsset.scale, 0)); } this.m_previewUtility.m_Camera.Render(); if (drawHandles) { Handles.SetCamera(m_previewUtility.m_Camera); foreach (var slot in m_skeletonAnimation.skeleton.Slots) { var boundingBoxAttachment = slot.Attachment as BoundingBoxAttachment; if (boundingBoxAttachment != null) { SpineEditorUtilities.DrawBoundingBox(slot, boundingBoxAttachment); } } } go.GetComponent <Renderer>().enabled = false; } }