Search Unity

Game Menu - Changing Colors on text PROBLEM

Discussion in 'Scripting' started by ArminPasalic, Aug 31, 2011.

  1. ArminPasalic

    ArminPasalic

    Joined:
    Feb 8, 2011
    Posts:
    58
    Hello, me and 2 of my friends have begun working on our first game!

    We wanted to start of with the Main Menu first so we did it simple for now and will change in the future.

    The problem only is that we used this code for changing colors of it when a mouse hovers over the selected text:

    It worked perfectly, all though whenever we SAVE the project or BUILD AND RUN(for testing) the text changes to White!!! Yes we have changed the text color to BLUE but it starts off white...

    We also used this code(seperate script) for having to changing to yellow when we click on it.




    If any of you don't understand what our problem is.. I will GREATLY make a video explaining it much more detail. :)

    Just reply if you want me to make the video...

    Regards,
    AP.
     
  2. ArminPasalic

    ArminPasalic

    Joined:
    Feb 8, 2011
    Posts:
    58
  3. Alienchild

    Alienchild

    Joined:
    Oct 14, 2010
    Posts:
    364
    add this:

    Code (csharp):
    1.  
    2. function Awake()
    3. {
    4. renderer.material.color = Color.blue;
    5. }
    6.