Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: mremus on August 02, 2013, 04:53:29 PM
-
I can't figure out how to make this happen: I have a Unity executable whose display rez is 3000x1920. So that the game and GUI's are spread across two 1920x1080 monitors. The left one in landscape orientation and the right one in portrait orientation (lft: 1920 + rgt: 1080 = 3000, with the vertical rez = 1920). In mu game, I have two NGUI UI's created one ( a minimap sitting over the main game) sitting on the left monitor, and the other UI (the main user interface) on the right monitor. I have written a fade script using Tween.Alpha that I have attached to a sprite in each respective UI. On a mouse click both sprites are to fade off.
Inside the Unity editor when I click the mouse both sprites fade away nicely. But when I run the associated Unity stand alone executable where each sprite is on its respective monitor
if I mouse click with the cursor on either screen the left sprite fades off but the right one doesn't fade off. I am to demo my progress to a customer on Monday so I am in a bit of a crunch. Any fast help would be greatly appreciated!
-
My guess is you forgot to check "run in background".
-
Thanks for the reminder ArenMook, I tried that and the sprite in the right hand screen still did not fade. Now the interesting thing is I ran several experiments and discovered this:
(BTW the sprite I am working with in the right screen fills the display)
If I create a second sprite the same size as the first and fill it with a solid color (black) and put its depth at say -1 and I have the first sprite's depth set at 2, add my fade script to the first sprite, create the standalone and run it. Bingo! The first sprite fades off the right hand monitor like it should. I don't understand why this works but it does. I also still do not know why without that second sprite behind the first, the first does not fade off. BTW I did activate and leave "run in background" on too. Any further thoughts I would appreciate hearing them.
Would it be easier to just fade the panel or the whole UI Root up the hierarchy chain? Thanks!
-
You can't fade the UIRoot, but you can fade a UIPanel.
Sounds like your camera clear settings is set to "depth only" and you don't have a camera clearing the color at all -- which is why fading doesn't work.
-
Yes that was the reason things were not fading! Thank you! Figures it was something subtle like that.
Would it be to much to ask how to I set up to have a second panel "underneath" the first. So that as the first fades away the "underneath" panel is revealed?
Thanks again, much appreciated.
-
Believe I have figured it out.