public static void test(Transform t) { GUIContent c = new GUIContent(t.position.ToString()); Vector2 l = HierarchyHelperTools.GetContentSize(c); Rect rect = HierarchyHelperManager.GetControlRect(l.x + _sliderValue); GUI.Label(rect, c); }
public static void DrawLayerName(GameObject obj) { GUIContent layerName = new GUIContent(LayerMask.LayerToName(obj.layer)); Vector2 size = HierarchyHelperTools.GetContentSize(layerName); Rect rect = HierarchyHelperManager.GetControlRect(size.x); GUI.Label(rect, layerName); }