Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Work Around to GUI Btn Disappearing?

Discussion in 'Immediate Mode GUI (IMGUI)' started by renman3000, Dec 29, 2011.

  1. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,680
    edit.
    found the answer here.
    http://answers.unity3d.com/questions/136720/gui-button-disappears.html
    **
    I am wondering tho. the above solution calls for a var declaration in the onGui, with out a breaker. How taxing is this to the system? Is there an alternative?




    Hi there,
    running a simple OnGUI script with more then one btn....

    function OnGUI()
    {
    if(GUI.RepeatButton())
    blah;

    if(GUI.RepeatButton())
    blu;
    }

    the problem is that, the second btn disappears as long as the first is held.
    This, for now is not a functional problem but an aesthetic one. How can I fix this?
     
    Last edited: Dec 29, 2011