Gui question with android device

I am working on the gui interface for my game.

my game has a terrain of 1000X1000 so you will have to scroll to view the entire terrain.

on the terrain in certain areas there are buttons to make strong holds.

my question is this. When programming the gui, is the placement of buttons relative to screen size or camera location?

basically i want to know if i plan on moving the camera will the buttons move as well or do i need to update their positions?

Using GUI. or GUILayout. will be based on the screen size not the camera location since it’s all rendered on the GUI Layer of your camera. You should not need to update their positions. Just make the GUI Buttons positions fixed or relative to the screen width/screen height.

var sW : float;
var sH : float;

//Tip:  when position GUI buttons and stuff, use an extra float variable like this
//then just put the variable into a place where you would normally have to play around
//with the numbers, then when you run it in Play mode, just change this value
var x0 : float;

function OnGUI()
{
  sW = Screen.Width; //just makes it easier to reference
  sH = Screen.Height;

  //relative to screen size
  if(GUI.Button(Rect(sW*.1, sH*.05, sW*.1, sH*.1), "Button Based on Screen Size"))
  {
    //do stuff
  }
  //fixed
  if(GUI.Button(Rect(10, 5, 50, 5), "Fixed Button"))
  {
    //do stuff
  }
      //Dynamic button, change the starting x position based on the value you can change in the inspector, sometimes it's best to use multiple variables for all elements of the Rect (x1, x2, x3);
     if(GUI.Button(Rect(sW*x0, 5, 50, 5), "Dynamic Button"))
     {
       //do stuff
     }
}

Hope this kinda helps. Good Luck.