So I have this code which goes through an array and creates a button out of each one item in it. But it is really weird, it adds about 25 draw calls for 5 buttons. But that seams absurd, 5 draw calls a button? It also displays them oddly with extra GUI around them (I am pretty sure its a weird error but I am sure its my code
![]()
if (MenuShowing == true)
{
foreach(MenuControls Control in MenuControlsList){
if (GUI.Button(new Rect(Control.XLocation, Control.YLocation, Control.Width, Control.Height), Control.Text)) { }
}
}
Thank you so much!
Have a lovely day!