public void EndLayout() { m_GUIWrapper.LayoutControl(m_HoveredBodyControlID, m_NearestBodyDistance * 0.25f); m_GUIWrapper.LayoutControl(m_HoveredJointControlID, m_NearestJointDistance); m_GUIWrapper.LayoutControl(m_HoveredTailControlID, m_NearestTailDistance); if (m_GUIWrapper.IsControlNearest(m_HoveredBodyControlID)) { m_HoveredBoneID = m_NearestBodyId; m_HoveredBodyID = m_NearestBodyId; } if (m_GUIWrapper.IsControlNearest(m_HoveredJointControlID)) { m_HoveredBoneID = m_NearestJointId; m_HoveredJointID = m_NearestJointId; } if (m_GUIWrapper.IsControlNearest(m_HoveredTailControlID)) { m_HoveredBoneID = m_NearestTailId; m_HoveredTailID = m_NearestTailId; } if (m_GUIWrapper.eventType == EventType.Layout && m_PrevHoveredBoneID != m_HoveredBoneID) { m_GUIWrapper.Repaint(); } }