i want to draw a square line at the edge of the screen

i want to draw a square line the four sides of the screen :left ,right ,top, border in my game.please help me how to do this.

Create a GUI style with a simple box image, then use that style in a GUI.Box draw in OnGUI,
or use GL.LINES,
or create a 3D plane and give it an appropriate texture a transparent shader (this will be difficult to get consistent results from).

You would want to draw only the lines themselves; methods like a single GUI.Box covering the screen or a plane with a texture will cause fillrate issues, since 99% of the pixels would be transparent, but the graphics card still has to draw them all.

–Eric

You should use Screen.height and Screen.width for calculations. The example for the right edge (1px line):

GUI.Box(Rect(Screen.width - 1, 0, 1, Screen.height), "", myStyle);

You should create a custom style in your skin and reference it by name, and keep the reference inside myStyle variable. And yes, your style background should be a single-colored image.

ok i try it