Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: devandart on January 24, 2014, 03:08:49 AM

Title: ScrollView: UIGrid hidden after SpringPanel.Begin
Post by: devandart on January 24, 2014, 03:08:49 AM
Hello,

I created a ScrollView via menu as child of the main Anchor.
The ScrollView contains a Grid and at runtime I create some items (childs) of the Grid.

Now I can scroll around my items, so far so good.

But when I try to scroll automatically with SpringPanel.Begin(...) to a specific item (this script is added to the Grid) I can't see the items anymore in the Game Window.
I can see the colliders moving right in the Editor window and I can scroll around as well but there are no item textures.

Do you know a solution for this problem?

Thanks!
Title: Re: ScrollView: UIGrid hidden after SpringPanel.Begin
Post by: ArenMook on January 24, 2014, 08:40:25 AM
Check the differences in position between the two. And make sure that the depth of your panels actually differs.
Title: Re: ScrollView: UIGrid hidden after SpringPanel.Begin
Post by: devandart on January 24, 2014, 09:50:58 AM
Ahhhh okay, now I got it.

The problem was that I added a Grid as child of the ScrollView, so my hierarchy was:
ScrollView -> Grid -> Items

Now I added the UIGrid Component directly to the ScrollView and it works:
ScrollView (with UIGrid component etc.) -> Items

Thanks anyway!  :)