Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

2 gui scripts / buttons don't react directly

Discussion in 'Immediate Mode GUI (IMGUI)' started by Alex Cruba, Sep 12, 2013.

  1. Alex Cruba

    Alex Cruba

    Joined:
    Aug 16, 2011
    Posts:
    564
    Hi all!

    I've 2 scripts for gui windows because of the well known gui depth problem. 2 buttons calling the void gui separately. The problem:

    1) I press button 1: window1 opens
    2) I press button 2: window2 doesn't open directly and also override close commands for window1

    When I press button 2, the button 1 window closes, but don't open window2 instead of. The next click opens window 2.

    Is that an engine problem? In one scropt any visibility/disable functions (true/false switches) work perfect.
     
  2. cpw1986913

    cpw1986913

    Joined:
    Jul 30, 2012
    Posts:
    4
    when you click button 2 in script 2, you may send some message to script 1, to tell unity don't draw window 1. if you want depth to control this ,i don't think it's a good idea.