Search Unity

inheriting GUI buttons

Discussion in 'Scripting' started by liewald, Sep 16, 2015.

  1. liewald

    liewald

    Joined:
    Apr 22, 2013
    Posts:
    6
    I have what I think is a simple problem but I'm hitting my head against the wall with it. Basically I am creating a large number of buttons to control various aspects of my program in a c# script using If GUI.Button (etc) and I am wanting to add a hover tooltip to the buttons. If the buttons were static I could add the necessary event triggers and build a windows etc. My thought was to inherit the button and add the necessary functionality, but I'm up against the wall. can anyone give me any pointers please.
     
  2. garrido86

    garrido86

    Joined:
    Dec 17, 2013
    Posts:
    233
  3. liewald

    liewald

    Joined:
    Apr 22, 2013
    Posts:
    6
    Hi my question is how do I do this when I'm creating the button dynamically from a script and not as a static button?