Author Topic: GUI not showing on other PCs  (Read 13893 times)

Teku Studios

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 13
    • View Profile
    • Teku Studios
Re: GUI not showing on other PCs
« Reply #15 on: June 29, 2013, 03:55:08 AM »
@JamieFristrom We tried almost every solution you name, so I'm afraid we can't help you with that. For us, the clipping solution worked perfect, but that's all we can tell, I'm afraid.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: GUI not showing on other PCs
« Reply #16 on: June 29, 2013, 06:51:51 AM »
It's very strange that adding clipping would fix it. It suggests that it might be a shader issue, since the clipped and non-clipped use different shaders. Well, as long as it fixes it for you. :)

Teku Studios

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 13
    • View Profile
    • Teku Studios
Re: GUI not showing on other PCs
« Reply #17 on: June 29, 2013, 06:57:25 AM »
It is really weird indeed. It seems that the Intel cards think that "none" clipping means "yes, there is clipping and its value is 0". In our studio's PCs setting clipping to "none" works perfect, but when testing it on a laptop with an Intel card, we need te create a clipped zone in order to get the GUIs rendered.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: GUI not showing on other PCs
« Reply #18 on: June 29, 2013, 03:44:13 PM »
Sounds like you've mistakenly chosen a clipped shader for your atlas ("Unlit/Transparent Colored (SoftClip)" for example) instead of "Unlit/Transparent Colored".

Teku Studios

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 13
    • View Profile
    • Teku Studios
Re: GUI not showing on other PCs
« Reply #19 on: July 01, 2013, 04:03:55 AM »
I'll check out, thanks.

JamieFristrom

  • Guest
Re: GUI not showing on other PCs
« Reply #20 on: July 03, 2013, 12:43:42 AM »
Here's some more clues about my situation.

The GUI seems to always appear in the Unity editor no matter which machine or OS I'm running it on.
It appears on my Intel HD Graphics 4000 768 MB machine if I'm running the game under Windows with any resolution.
It appears if I run the game under Mac OSX in native resolution, or in a window:


But if I run the game under Mac OSX in a non-native resolution, it looks garbagey:


And FWIW, if I run the game under Mac OSX with NGUI free, it looks garbagey in a different way:


And on most other machines with most other video cards the UI doesn't appear at all.

And I'm using Unlit/Transparent Colored on the atlas.

Do those clues make it obvious? What am I doing wrong?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: GUI not showing on other PCs
« Reply #21 on: July 03, 2013, 05:58:43 AM »
Check your camera settings.
1. Ensure that your main camera has a depth of 0, and is set to clear Color, with the color's alpha set to 255.
2. Ensure that your UI camera has a depth of 1, and is set to clear depth.
« Last Edit: July 04, 2013, 05:26:38 PM by ArenMook »

JamieFristrom

  • Guest
Re: GUI not showing on other PCs
« Reply #22 on: July 03, 2013, 11:21:49 AM »
Thanks for your quick response! I thought that was going to be it, my camera was at -1 and I was using a skybox.

But no.   :(

Side question: does this mean NGUI isn't compatible with skyboxes?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: GUI not showing on other PCs
« Reply #23 on: July 03, 2013, 03:35:40 PM »
Skybox clears color, so that's fine. Do you have post-processing effects enabled? I see some black outlines there. You need to make sure those effects are on the main camera, not on the UI camera. Are these two the only cameras you have?

JamieFristrom

  • Guest
Re: GUI not showing on other PCs
« Reply #24 on: July 03, 2013, 07:33:04 PM »
Yes, I have post-processing effects enabled, and have just discovered that turning them ALL off along with turning off deferred lighting makes the UI work as advertised...  but I don't have those effects on the UI camera. Those are the only cameras in the scene.

I could probably live without deferred lighting but giving up my shaders is too much to ask. NGUI's supposed to work with these things, right?

Would you like to make you a small project that reproduces the problem? Do you have a Mac with an Intel HD 4000 you could test it out on?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: GUI not showing on other PCs
« Reply #25 on: July 04, 2013, 08:17:48 AM »
The UI camera must use forward rendering. You can't have it use deferred.

JamieFristrom

  • Guest
Re: GUI not showing on other PCs
« Reply #26 on: July 04, 2013, 12:36:06 PM »
The deferred lighting was on the main camera, *not* the UI camera. There are also no postprocessing shaders on the UI camera.

Even if I turn deferred lighting off on the main camera, the bug is still there. The only way to make the bug go away is to turn off all the postprocessing shaders on the main camera.

That is unexpected behavior, right? I'm supposed to be able to make a game with image effects on the main camera and still use NGUI?

I'll make a small project for you so you can see it yourself. It happens not only on a Mac Mini but also my Windows laptop with Intel 4 series express, and I'm told it happens on pretty much any nVidia machine.

JamieFristrom

  • Guest
Re: GUI not showing on other PCs
« Reply #27 on: July 04, 2013, 01:35:41 PM »
Ok! I've uploaded a small project that demonstrates the issue:

https://docs.google.com/file/d/0B52cQuwRijG8czM4Wi0xVTAzZ3M/edit?usp=sharing

To reproduce the problem:
- open the project with Unity Pro
- import NGUI into the project
- play the project: you should see some UI widgets in the game window
- build and run the project on a Windows PC with a GeForce GPU or Intel 4 Series Express, or on a Mac with Intel HD 4000 (if on a Mac, run fullscreen in non-native resolution)
  - note that the UI widgets either don't show up (on Windows) or are corrupted (on Mac)
- now go to the Main Camera and switch Rendering Path to Forward and disable Tonemapping. Build and run again and you should see the widgets as expected.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: GUI not showing on other PCs
« Reply #28 on: July 04, 2013, 05:26:51 PM »
Set your UI camera to clear depth, and your UI will work. You might also want to fix your layers... UI needs to be on the "UI" layer, and you have it on "Default". And your elements are positioned oddly... as a rule of thumb, if you select the UIRoot and hit ALT+SHIFT+P and something changes, then you're likely doing something wrong.

JamieFristrom

  • Guest
Re: GUI not showing on other PCs
« Reply #29 on: July 05, 2013, 11:48:37 AM »
Thanks, that *did* fix it. FWIW, here's why I look stupider than I am: I did read your previous post saying set it to Depth, believe it or not, and tried it ... twice, even ... but turned out I had a line of script that was setting it back to Nothing that I'd forgotten about. (It was an Oculus thing - "If they're using an Oculus, set Clear to Solid, if they're not, set Clear to Nothing." Whoops. It's Depth now.)

Thanks so much for your patience, and for taking a look. Great product, great support! Cheers!