Author Topic: Panel clipping not working on mobile devices but works on Editor.  (Read 6758 times)

karsnen

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 25
    • View Profile
Hello,
Target : Android
Platform : Mobile

 I have a UIPanel to clip draggable objects and so it has Draggable Panel Script to it.

The clipping is Alpha clipping. I do not use any shaders. It is just a button and a UISprite (simple) sprite as child.

The clipping works perfectly fine on editor but on the machine, it is just does not
clip PROPERLY.

Lets say I am moving a drag panel content, it does not clip until I release my finger or touch another Panel.
The device I test is the new Nexus 7.

This is how my Panel looks in the inspector pane.

I highly appreciate your help. I think it is a minor issue which I am not able to see.

regards,
Karsnen.

iamfeneq

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: Panel clipping not working on mobile devices but works on Editor.
« Reply #1 on: October 26, 2013, 04:00:41 PM »
I am having this same issue. Working great in editor, does not seem to work on my android device. Does your panel show up at all with clipping on?

Edit:
Seems that soft clip works. This may not work out for you but for my purposes it is okay. Still would rather do an alpha clip.
« Last Edit: October 26, 2013, 04:09:18 PM by iamfeneq »

karsnen

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 25
    • View Profile
Re: Panel clipping not working on mobile devices but works on Editor.
« Reply #2 on: October 26, 2013, 04:15:11 PM »

Well, unfortunately soft clip also does not work for me.
What do you mean by "Does your panel show up at all with clipping on?"?
It the components are clipped accordingly when you release your finger from that collider, else NO CLIPPING.


iamfeneq

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: Panel clipping not working on mobile devices but works on Editor.
« Reply #3 on: October 26, 2013, 04:26:52 PM »
When the panel in question has alpha clipping turned on, does the panel show any of its content at all? For me, when alpha clipping was on my panel, none of the widgets were shown. (on my android device only, in editor it worked as I expected).

karsnen

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 25
    • View Profile
Re: Panel clipping not working on mobile devices but works on Editor.
« Reply #4 on: October 26, 2013, 07:37:10 PM »
Well there was one time where none were shown, then I had to bring a fresh copy of NGUI. It solved that issue.

Beyond that one point, components usually show up. I have no problem with that.

Still no progress on that.  :'(

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Panel clipping not working on mobile devices but works on Editor.
« Reply #5 on: October 26, 2013, 08:08:08 PM »
If it clips in the editor but not on the device then your device doesn't support shaders. This can be due to hardware (iPhone 3G and earlier), software (your quality settings was set to 'fastest'), or not including the Resources folder.

karsnen

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 25
    • View Profile
Re: Panel clipping not working on mobile devices but works on Editor.
« Reply #6 on: October 26, 2013, 08:39:48 PM »
If it clips in the editor but not on the device then your device doesn't support shaders. This can be due to hardware (iPhone 3G and earlier), software (your quality settings was set to 'fastest'), or not including the Resources folder.




Hello, Thank you for your response.

But
1. My device is a new Nexus 7
2. As for shaders are concerned, I do not use any shaders. It is just blind Simple UISprite and nothing on top of it.
3. "not including Resources folder" - Hmm I have a Resources folder in my project but it does not contain any files that are required for my UI. I also do not do Resources.load for UI anywhere

I hope I did comprehend you properly.


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Panel clipping not working on mobile devices but works on Editor.
« Reply #7 on: October 26, 2013, 08:48:49 PM »
NGUI uses shaders in order to do clipping. To do clipping, NGUI replaces the shader used by the atlas with a version of it that supports clipping. This shader is loaded from the Resources folder.

karsnen

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 25
    • View Profile
Re: Panel clipping not working on mobile devices but works on Editor.
« Reply #8 on: October 27, 2013, 11:46:34 AM »
Aren,

Thank you. I "Shaders" were not inside "Resources" folder.

Appreciate your help.