- Home /
GUI not work after building
hello, everyone! I create a 'menuframework ' using gui, it works well in debug mode,but after building it, the menuItem can not shown when i click popupMenu. here is the diagram:
When i click file, the 'Exit' button do not show in release mode,but in debug mode!I have no idea now,any answer will be appreciated!
Impossible to say anything without any code as there is no common reason here unless you use some strange way to calculate the position for it
I use CalcSize function to calculate the width and height of a menu item,and the code is complex, it works well in debug mode, and i do not know which part of code to paste.
ps:i doubt that maybe there is something wrong with CalcSize function. Are there any side effects using this function? And what about this function:GUILayoutUtility.GetRect? Thank you!
Script.js/cs ... Without it I can't help from my side :).
Yes it might be GUILayoutUtility.GetRect, it does many problems, as far as know, its often not stable after building. Try to read this http://forum.unity3d.com/threads/8278-GUILayoutUtility.GetRect-with-inconsistent-results maybe that's your problem :).
Answer by Yanger_xy · Jul 07, 2011 at 10:55 AM
The real reason is that i put the Input.GetMouseButtonDown function in OnGUI function!
Your answer
Follow this Question
Related Questions
GUI works flawlessly in editor, but will not show in standalone build. 1 Answer
Distribute terrain in zones 3 Answers
Paused Menu backdrop 1 Answer
Draw crosshair INSTEAD of cursor. 1 Answer