Author Topic: UIDraggablePanel Problem  (Read 8033 times)

Pei

  • Guest
UIDraggablePanel Problem
« on: August 25, 2012, 12:39:25 AM »
Hello, NGUI and members.

I'm using NGUI for the UI of my project.
I'm happy with polished UI components of the NGUI. :)

Now, I have some troubles with them.
I've used the UIDraggablePanel and UITable to render the list of products.
When I tested them within WebPlayer simulator of the Unity, they worked perfectly.
But when I built and installed the result to the iPhone, the clipping area of the UIPanel didn't work correctly.
While I'm dragging the list and contents of the panel goes off the panel, they're still visible.
And when I release the dragging, they go invisible after some delay.

I'm not sure what's wrong for me.
Looking forward to hear any advice from you.

Thanks,
Pei.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIDraggablePanel Problem
« Reply #1 on: August 25, 2012, 01:11:00 AM »
That means you built it with OpenGL ES 1.1 targeted. You need OpenGL 2.0 for shaders to work. Clipping requires shaders.

Pei

  • Guest
Re: UIDraggablePanel Problem
« Reply #2 on: August 26, 2012, 07:55:19 PM »
Thanks for your kind help.
So what should I do to do this?

I've changed the Target Platform to armv7 rather than universal, but it still have the same issue. :(
Please let me know what I'm doing wrong.

Thanks,
Pei.

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Re: UIDraggablePanel Problem
« Reply #3 on: August 27, 2012, 05:04:11 AM »
Hi,

If you're also having this issue in the Editor, try to go in Edit -> Graphic Emulation -> Select Open GL ES 2.0
And if you've set the target platform to armv7 everything should work fine.

Pei

  • Guest
Re: UIDraggablePanel Problem
« Reply #4 on: August 27, 2012, 08:49:49 AM »
Hello,
Thanks for your advice.

I still have the problem with them.
When I test in Editor, they works well.
But when I build and install them to my iPhone, they don't be clipped out off the panel.

I'm using Unity 3.5.5, xCode 4.4.1 and iPhone 4.
If you're expert on Unity3d and NGUI, this may not be big problem.

Thanks,
Pei.

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Re: UIDraggablePanel Problem
« Reply #5 on: August 27, 2012, 08:57:36 AM »
Well I'm no expert, just a user of NGUI.
Sorry I can't help you from there, ArenMook of PhilipC will help you better than I can.

Pei

  • Guest
Re: UIDraggablePanel Problem
« Reply #6 on: August 27, 2012, 09:22:00 AM »
Thanks for your time and help.

Pei.

Pei

  • Guest
Re: UIDraggablePanel Problem
« Reply #7 on: August 27, 2012, 09:24:53 AM »
Hello, ArenMook.
I still couldn't get right solution for this problem.
I think that only you can help me to solve this issue.
I'm looking forward to hear from you soon.

Thanks,
Pei.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIDraggablePanel Problem
« Reply #8 on: August 27, 2012, 12:28:26 PM »
If it works in the editor but doesn't work on the iPhone, then the issue lies either in shaders not working  (which you say you've ruled out), or in shaders not being able to load. Look in UIDrawCall line 159:
  1. else if (mClipping == Clipping.SoftClip) shader = Shader.Find(shaderName + soft);
Is it able to find the shader? But a debug log here. If it can't find it, then there is your problem, and the question then becomes -- why. Did you move them out of the Resources folder? Did you do anything else such as tell Unity to strip everything out of the executable?

Pei

  • Guest
Re: UIDraggablePanel Problem
« Reply #9 on: August 27, 2012, 01:08:28 PM »
Hello, ArenMook
Seems you're right.

I couldn't load the items of Resource folder when running the app on the iPhone.
I'm trying to load a texture dynamically from the Resources folder but I couldn't load them.
I think that NGUI's shaders are the same (I placed the Shaders folder of NGUI to Resources).

So would you like to kindly let me know the solution to this?
I've set the Stripping Level to Disabled. (Did you mean this by telling Unity to strip everything?).
I'm newbie to Unity as well as NGUI.

Thanks for your kind understand and help.
Pei.

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Re: UIDraggablePanel Problem
« Reply #10 on: August 27, 2012, 01:28:39 PM »
If it can help, I have my project folders like that :
-- NGUI
---- Resources
------ Shaders

Pei

  • Guest
Re: UIDraggablePanel Problem
« Reply #11 on: August 27, 2012, 01:59:02 PM »
Hello.

Did you have experiences of dynamic loading of Resources before?
So can you load the texture or shader at runtime on player (iPhone)?
I can load them in Editor, but in my iPhone.

Thanks for your help.
Pei.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIDraggablePanel Problem
« Reply #12 on: August 27, 2012, 02:21:31 PM »
It all works fine on my two android devices, so I don't know.

Pei

  • Guest
Re: UIDraggablePanel Problem
« Reply #13 on: September 01, 2012, 12:19:00 AM »
So, I've solved this problem at all.
I've linked those textures and shaders to my materials in the scenes as well as putting them under Resources folder.
This is very strange but I think that unity is unloading them at runtime.

Anyhow, I hope this will help someone who has similar problems. :)
Thanks,
Pei.