- Home /
Rotating a EditorGUI.LabelField (or making vertical text)
Hi, I've been trying to rotate a LabelField by 90° (or -90°). I tried using the GUI.matrix and the EditorGUIUtility.RotateAroundPivot() function. This last kind of works, but it rotates the whole component. If I do another EditorGUIUtility.RotateAroundPivot() with an negative angle to reverse the transformation, I won't see any rotation at all:
for ( int i = 0; i < characterNames.Count; ++i ) {
EditorGUIUtility.RotateAroundPivot( 90f, checkRect.center );
EditorGUI.LabelField( checkRect, characterNames[ i ] );
EditorGUIUtility.RotateAroundPivot( -90f, checkRect.center );
}
All I have seen are GUI (not EditorGUI) related issues, don't know if both works the same underneath. Btw, I am using these inside the OnGUI() of a PropertyDrawer. Any help or direction will be greatly appreciated.
Thanks!
Answer by Glaskows · Apr 28, 2014 at 10:00 PM
Further information: it appears to be linked to an ongoing bug (named on another answer http://answers.unity3d.com/questions/377207/drawing-a-texture-in-a-custom-propertydrawer.html)
Sometimes the text flicker for a really small amount of time and I can see it vertical.