public Rect GetDrawRect() { if (drawRect.width != 0) { return(drawRect); } float bWidth = toolbar.GetButtonWidth(); float rectX = Screen.width / 2 - toolbar.GetToolbarWidth() / 2 + bWidth * buttonIndex; drawRect = new Rect(rectX, Screen.height - bWidth, bWidth, bWidth); return(drawRect); }