I want to create an inventory system and i want to create my buttons with using GUI.Button.I create them like this.
void OnGUI()
{
GUI.Button(new Rect(0, 220, 100, 20), "Top-left");
GUI.Button(new Rect(120,220, 100, 20), "Top-right");
GUI.Button(new Rect(0, 280, 100, 20), "Bottom-left");
GUI.Button(new Rect(120, 280, 100, 20), "Bottom-right");
}
My problem is i cant move them. I mean i want to add a scrollrect to my inventory. But even if i add it my buttons are not moving. How to i move it dynamically like normal buttons or how to i scroll them with using script ? Thanks for your help.