private static void DrawPoseError(Transform node, Bounds bounds)
{
Camera current = Camera.current;
if (current)
{
GUIStyle gUIStyle = new GUIStyle(GUI.skin.label);
gUIStyle.normal.textColor = Color.red;
gUIStyle.wordWrap = false;
gUIStyle.alignment = TextAnchor.MiddleLeft;
Vector3 position = node.position;
Vector3 vector = node.position + Vector3.up * 0.2f;
if (node.position.x <= node.root.position.x)
{
vector.x = bounds.min.x;
}
else
{
vector.x = bounds.max.x;
}
GUIContent content = new GUIContent(node.name);
Rect position2 = HandleUtility.WorldPointToSizedRect(vector, content, gUIStyle);
position2.x += 2f;
if (node.position.x > node.root.position.x)
{
position2.x -= position2.width;
}
Handles.BeginGUI();
position2.y -= gUIStyle.CalcSize(content).y / 4f;
GUI.Label(position2, content, gUIStyle);
Handles.EndGUI();
Handles.color = AvatarSkeletonDrawer.kErrorMessageColor;
Handles.DrawLine(position, vector);
}
}