Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Here is a mockup of a main menu screen I'm trying to put together in Unity.

I'm clueless as to how I should go about creating the blue glow on the left of my menu options. Can somebody point me in the right direction?

Mockup

share|improve this question
3  
It looks like just a blue gradient. That shouldn't be hard. Unless I'm missing something? –  ashes999 Mar 24 '12 at 22:19
    
Transparent texture over the entire screen? –  ktodisco Mar 24 '12 at 22:28
    
@ashes999: It is indeed nothing more than a blue gradient. I'm just not clear on how (if it is even possible) to do this natively in Unity. –  blz Mar 25 '12 at 14:23
    
@ktodisco: could you elaborate? –  blz Mar 25 '12 at 14:23
    
It looks like you are using a GUI library which is probably creating a Camera specifically for the gui buttons. Use that camera and render a GUITexture or better yet a planar Mesh and use a gradient with alpha falloff in a material. You can probably also make the gradient texture 1px tall and set it to Wrap instead of Clamp in the texture properties window. –  Rubber Mallet Mar 25 '12 at 15:10

3 Answers 3

up vote 11 down vote accepted

You will want to create your background (gradient) in another program such as Photoshop or GIMP, and then import it. Following that, simply draw it to the screen in the position you want it. Stretching gradients works well because of bilinear filtering: so you don't need to worry about making it massive (e.g. 512x512 should work fine).

There is no reason to use shaders/effects here.

share|improve this answer
4  
I couldn't edit this in because it would be changing the answer: but you might want to mention creating a simple white gradient and then altering the color of it with a shader. This will allow him to re-use it in other places. –  Jonathan Dickinson Mar 26 '12 at 13:04
    
+1 for simplicity. Using GUI.DrawTexture() should be all you need: unity3d.com/support/documentation/ScriptReference/… –  chaosTechnician Mar 26 '12 at 17:04

u have apply another texture when mouse over on button

share|improve this answer
2  
he was talking about the light background gradient on the left, not the buttons –  XiaoChuan Yu Mar 30 '12 at 7:52

Try using NGUI (available in the asset store) - It lets you overlay 2D user interfaces and is dead easy to use. Your fade above would just be a solid blue rectangle with an alpha mask that fades from solid to transparent.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.