Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: burlak on June 14, 2012, 09:22:00 AM

Title: Cant show panels on ipad
Post by: burlak on June 14, 2012, 09:22:00 AM
Hi!

Help me please.

I switch UIPanels via SetActiveRecurcivelly(true/false). It works well in Editor:

https://docs.google.com/open?id=0B2z51FnZuTMVaE9Wa0VlWU81cHM

But doesn't work in Player (ipad3):

https://docs.google.com/open?id=0B2z51FnZuTMVT2paRWRhZ0tvQ3c

If i dont deactivate panel on startup my application, the panel looks good. But i need to hide some panels.

Help me please, what am i doing wrong?
Title: Re: Cant show panels on ipad
Post by: Ferazel on June 14, 2012, 10:44:18 AM
I can't see the pictures. However, have you tried the NGUITools.SetActive() instead of SetActiveRecursively? NGUI elements seem to work better with that than the Unity GameObject's SetActiveRecursively.
Title: Re: Cant show panels on ipad
Post by: burlak on June 14, 2012, 11:37:55 AM
Hi! Thank you for quick answer. I tried it, but it still doesnt work.

It seems, this error appears for "dynamic" items - on DragPanel.

It works well in Editor but has error on ipad3... Cant understand why.

I updated links to screenshorts, look at its pls.
Title: Re: Cant show panels on ipad
Post by: PhilipC on June 14, 2012, 02:52:11 PM
When you run it on the iPad do you see any errors in the log? I know sometimes Unity doesnt do things properly if its hits a error.
Title: Re: Cant show panels on ipad
Post by: burlak on June 17, 2012, 11:16:56 PM
Hi!

In the log there are no errors. I cant see scrolling controls only. If I dont disable this panel on startup, all looks fine. UITexture and Meshes are displayed properly in any case, but the UILabels and UISprites - no.

Maybe I should to call some methods to refresh UI after activate/deactivate?

Help me please, what am i doing wrong?

PS:I can send you my project with this bug.
Title: Re: Cant show panels on ipad
Post by: joreldraw on June 18, 2012, 01:29:27 AM
I think this is a Z order problem, because on Player.png appear the shield & the heart.
Check the order of your elements & check z size of your camera.

Sometimes too i have get invisible panels when i change elements on z distance.
For me work fine all elements in z = 0 and modifing depth.
Title: Re: Cant show panels on ipad
Post by: Nicki on June 18, 2012, 02:18:51 AM
Is it bad in ipad1/2 as well? It may be because of the ipad 3 resolution, so your things are off-screen. Try Debug.Loging the localPosition of some of your items and see what their placement is. Then you'll also get the Z value, just too see if it's been pushed into the picture behind your 3D.
Title: Re: Cant show panels on ipad
Post by: burlak on June 18, 2012, 07:55:31 AM
Yes, you right. I have tested on iPod4 - works fine. It seems on ipad3 are bad cliping areas.