Search Unity

[solved] GUISkin CustomStyles and missing control text

Discussion in 'Immediate Mode GUI (IMGUI)' started by Ghorre, Jun 13, 2014.

  1. Ghorre

    Ghorre

    Joined:
    May 7, 2014
    Posts:
    11
    Hi all,

    I'm new to Unity3D and I'm currently learning the GUI whereabouts, and I've stumbled upon this problem and I wonder if it's a bug or something that I do wrong...

    I was messing with GUISkin CustomStyles on different controls, checking how it changes the looks of the GUI and all...

    Now...

    I currently have Unity3D 4.5.0f6 (downloaded & installed yesterday).

    I've downloaded from the Assets Store the free Built-in GUI Skin (the one that is used by default, if there's no GUI assigned by Yourself - or "was" used as it kinda looks a bit different I think...).

    I've coded a script that defines global GUISkin variable and linked the downloaded skin to it (in the Inspector).
    I also defined a CustomStyle (as seen in the screeny below).


    Later I've scripted 3 buttons in 3 different ways:
    1. one with the default skin
    2. another with the skin defined GUI.Toggle looks
    3. and last one that uses Skin.CustomStyles


    The result of this is that first two buttons do have their captions.
    The last one - doesn't.



    For the simplicity I'm attaching sample project the screens were taken with.

    Am I doing something wrong or is this a bug ?
     

    Attached Files:

  2. IsGreen

    IsGreen

    Joined:
    Jan 17, 2014
    Posts:
    206
    By default, Custom Styles ALFA text color is 0. (I don't know the reason).

    Always, you must change it to 255 or upper to 0.

     
    Ghorre likes this.
  3. Ghorre

    Ghorre

    Joined:
    May 7, 2014
    Posts:
    11
    Good catch !

    Thanks !