GUI Depth not working

I have two different scripts that draw GUI elements.

The first script draws 3 GUI elements, and I use GUI.Depth to place the elements on top of each other:
// Draws the background
GUI.depth = -1000;
Rect backgroundRect = new Rect(0, 0,Screen.width, Screen.height);
GUI.DrawTexture(backgroundRect,sceneBackground);

		GUI.depth = 0;
		// Draws the back button
		GUI.backgroundColor = new Color(0,0,0,0);
		if(GUI.Button(new Rect(10, 10, backButton.width / 2f, backButton.height / 2f), backButton))
		{
			Application.LoadLevel("Menu");
		}

		
		// Draws the camera GFX
		Rect cameraGFXRect = new Rect(
			(Screen.width / 2) - cameraGFX.width / 4, 
			(Screen.height / 2) + cameraGFX.height / 4, 
			cameraGFX.width / 2f, 
			cameraGFX.height / 2f);
		GUI.DrawTexture(cameraGFXRect,cameraGFX);

Then the second script draws a rectangle in the center of the screen, also using GUI.Depth to draw the rectangle above the other GUI elements that already appear on screen:

GUI.depth = 10;
				Rect cardRect = new Rect((Screen.width / 2) - (cardTexture.width / 4), (Screen.height / 2) - (cardTexture.height / 4), cardTexture.width / 2 , cardTexture.height / 2);
				GUI.DrawTexture(cardRect,cardTexture);

Even though the first elements were drawn at a depth of -1000 and 0, and the second script draws at depth of 10, the GUI element from the second script appears below the elements from the first script??

I would very much appreciate it if someone could explain what I am doing incorrectly?

TIA!

GUI.depth is taken in account on separated scripts, in your first script doing

GUI.depth = -1000; 

and then

GUI.depth = 0; 

will be ineffective.

the higher the value of GUI.depth is, the further your GUI elements are behind. you may have took it the wrong way :stuck_out_tongue: