Paxew
Topic Author
Posts: 5
Joined: 25 Apr 2017, 18:59

Unity overflow issue

01 May 2017, 19:24

Hi

I have an issue with the listbox items turning transparent in some cases.

When I create, for example, an ListBox and add items to it so that the items fill the whole height and the scrollbar becomes visible the issue shows up. See the attached screenshot.
issue.jpg
The trees can be seen through the ListBox items whenever there are enough items in it that the scrollbar becomes enabled.

What could be the issue here? Am I doing something wrong when this happen or is it a bug?
 
Paxew
Topic Author
Posts: 5
Joined: 25 Apr 2017, 18:59

Re: Unity overflow issue

03 May 2017, 11:26

I got this sorted out. I had the GUI Camera's clear flag set to "Nothing" as mentioned in the documentation. But if I changed the clear flag to Depth it is now looks correct instead.
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Unity overflow issue

03 May 2017, 20:41

Hmm, right. Setting the clear flag to "Nothing" it is not going to be enough if Unity is using the stencil. And it seems that it is being used for rendering the shadows in that scene. Thanks for coming back with the solution.

By the way, why are you using a separate camera, is it because you want to avoid camera posteffects being applied to the UI?
 
Paxew
Topic Author
Posts: 5
Joined: 25 Apr 2017, 18:59

Re: Unity overflow issue

03 May 2017, 22:14

@jsantos Yes, I use a separate camera for the gui. At the moment I don't use any camera post effects but I will later, so I thought I'd set it up straight away with two cameras. Not sure if I will keep it this way, maybe it would look good having the post effects affect the gui too, I'll have to test later when I get to that stage.

Will there be any drawbacks with this method, having a separate camera for the gui? I guess there will be a small overhead having two cameras rendering stuff but are there other drawbacks?
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Unity overflow issue

04 May 2017, 21:55

Will there be any drawbacks with this method, having a separate camera for the gui? I guess there will be a small overhead having two cameras rendering stuff but are there other drawbacks?
The only overhead is just the extra clearing that is needed. Same performance apart from that.

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 86 guests