Author Topic: Draggable Panel problem  (Read 6617 times)

Sorian

  • Guest
Draggable Panel problem
« on: July 19, 2012, 08:12:11 PM »
Our company recently decided to use nGUI on our current project. Things have been going smoothly, up until today. I have spent more time than I care to admit on this issue, so I hope you can help.

I am trying to set up a scrollable list. I have a panel with a clip area defined (the type of clip makes no difference) and a UIDraggablePanel script attached to it. This panel has a child object with a UITable script attached to it. This UITable object has several test child objects attached. Each one of the test objects has a collider and other child objects that are supposed to display text.

Now, to the problem. While scrolling (either with the mouse wheel or by dragging) the items will all show up (even outside of the clip area) and then the one outside the clip area will disappear, unless I scroll too far down and then everything disappears. I can see the outlines of all of the objects in the Scene view, but they are hidden in the Game view.

I have gone over Example 7 repeatedly, but I have everything laid out the same as the example, so I have no idea what the issue might be.

nGUI version: 2.0.8
Screenshot attached (pink outline denotes where the clip area is)

Any ideas?
« Last Edit: July 19, 2012, 08:14:32 PM by Sorian »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Draggable Panel problem
« Reply #1 on: July 19, 2012, 08:52:06 PM »
Since they don't disappear, the only cause of this can be is shaders not working.

GLES 1.1 emulation being turned on = no shaders. It's explained in the FAQ.

Sorian

  • Guest
Re: Draggable Panel problem
« Reply #2 on: July 19, 2012, 09:15:36 PM »
They disappear once I stop scrolling (either all of them disappear if I scroll down a bit, or just the ones I expect disappear if it is still near the top).

Sorian

  • Guest
Re: Draggable Panel problem
« Reply #3 on: July 20, 2012, 11:59:44 AM »
Took a look, and I can't find an option for GLES emulation. We are developing for Windows, if that makes a difference.

Here is my problem in more detail:

While dragging:
If I am near the top of the list all items in the list are visible.
If I am scrolled down a bit (more than four or so items are scrolled up past the top of the clip area) all items are NOT visible.

While not dragging:
If I am near the top of the list things looks mostly normal.
If I am scrolled down a bit (see above) all items are NOT visible.

Example 7 works fine, which is odd.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Draggable Panel problem
« Reply #4 on: July 20, 2012, 02:52:16 PM »
Check what shaders you're using for your UI. The shader must be "Unlit/Transparent Colored". If you use another shader, you'll have to write your own clipped version of your shader by looking at how it's done with the Unlit/Transparent Colored shader.

Sorian

  • Guest
Re: Draggable Panel problem
« Reply #5 on: July 20, 2012, 03:19:14 PM »
Using Unlit/Transparent Colored.

Sorian

  • Guest
Re: Draggable Panel problem
« Reply #6 on: July 20, 2012, 03:28:46 PM »
It appears every child object is being acted upon at the same time. With clipping set to soft they all start to fade at the same time when scrolling down the list, not individually as you would expect.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Draggable Panel problem
« Reply #7 on: July 20, 2012, 03:47:41 PM »
Make sure that the scales of all game objects leading up to your widgets are (1, 1, 1). Other than that, I don't know what you did wrong. Pay close attention to what's different between your app and the examples.

Sorian

  • Guest
Re: Draggable Panel problem
« Reply #8 on: July 20, 2012, 03:55:49 PM »
Son of a...

There was 1 (the panel attached to the Anchor) panel where one of our art guys had attached a UIStrech component. So, where does that component belong? The Root object?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Draggable Panel problem
« Reply #9 on: July 20, 2012, 03:56:54 PM »
UIStretch should only go on the widget itself.

Sorian

  • Guest
Re: Draggable Panel problem
« Reply #10 on: July 20, 2012, 03:57:58 PM »
Ah, good to know.

Thanks. Compiling an email to send out to our art team now.

play_edu

  • Newbie
  • *
  • Thank You
  • -Given: 10
  • -Receive: 0
  • Posts: 21
    • View Profile
Re: Draggable Panel problem
« Reply #11 on: July 20, 2013, 03:48:44 AM »
i have same issu. But thanks it's working because i made same mistake.