GUI.DrawTexture over screen

Hi guys, i want to create fading effect before game’d started. My steps are:

initialize texture:

1) 	private Texture2D	m_texture;
        ..................................
        m_texture = new Texture2D(1, 1);	
 
Apply Color to texture:

2)      m_texture.SetPixel(0, 0, new Color(0, 0, 0, alpha));
        m_texture.Apply();

Draw texture:

3)      GUI.depth = 0;
	    GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height),  m_texture, ScaleMode.StretchToFill);	

	
For all others components and windows i've setted GUI.depth  greater than 0 (1...n)

But one gui window whatever draws over this texture...

Any idea ?

hm…
i’m posting problematic windows and fading texture:

------------------------
Window OnGui
Fade OnGui
Fade OnGui
Window OnGui
------------------------
Window OnGui
Fade OnGui
Fade OnGui
Window OnGui
------------------------

thanx to all who looked here…

I found an answer:

  1. be sure that u setting GUI.depth for any class presenting on a scene gameobjects does not have the same value

  2. be sure tha gui.depth u need is always less then all others

  3. gui depth are only works with different scripts (like script execution order at runtime and gui)

Is it possible the troublesome GUI draw call that you’re talking about is happening AFTER your fade texture is being updated? What order are you drawing the GUI textures in?