Search Unity

Create UI buttons in runtime

Discussion in 'Immediate Mode GUI (IMGUI)' started by willemsenzo, Sep 28, 2014.

  1. willemsenzo

    willemsenzo

    Joined:
    Nov 15, 2012
    Posts:
    585
    I just can't get used to the new UI. I tried to find out how to create buttons in runtime but so far I only find how to add buttons in sceneview. Do I have to create a canvas object and then add button components to the canvas?
     
  2. sdb7

    sdb7

    Joined:
    Apr 8, 2013
    Posts:
    23
    i stopped on how to link event handler by code..its plainly weird, coming from windows desktop developer for years or its just only me
     
  3. willemsenzo

    willemsenzo

    Joined:
    Nov 15, 2012
    Posts:
    585
    Personally I don't have any problems with linking things through code but I can't seem to find any examples on how to implement GUI through code in Unity 4.6. The old GUI may be outdated and inefficient but it at least allows you to create buttons on the fly. Am I missing some crucial piece of information?