- Home /
Strange behaviour GUI.Box
Hi!
I found strange behaviour when using the GUI.Box call.
int startY = 50;
for (int i=1;i<4;i++,startY+=50) {
GUI.Box (new Rect (10,startY, 300 ,30), "This is an example");
}
The output is like this:
Some lines get cut for some reason. I am using the standard skin and standard style. Does anyone know why this happens and what to do about it? Thanks!
That looks really weird indeed. O_O What happens if you draw the 3 boxes with GUILayout.BeginVertical(); + 3xGUILayout.Box("This is an example"); + GUILayout.EndVertical();?
I tried it in a state of default,
but the state did not happen.
What kind of case does it happen in?
Thank you for your answers. I don't know how it happened. But a restart of the IDE fixed the problem oO
I can only say it happened when I changed my own EditorWindow often (which is non-related to the code above). Seems like some kind of weired but unharmful bug in Unity (3.4.2).
... Sorry, thanks anyway!
Interesting. Glad you got it fixed. :) I didn't have the first idea what was causing that.
Your answer
Follow this Question
Related Questions
GUI box problem? 0 Answers
Change colour of GUI box, keep round corners. 0 Answers
How to display a rectangle around a player? 1 Answer
Custom GUI.Box function dilemma 1 Answer
How do I move a GUI Box Over Time? 1 Answer