Author Topic: Weird problem with drag panel on iOS: colliders repeat and block other panels.  (Read 6358 times)

JosephFerano

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 27
    • View Profile
Hello, I am having a really odd problem with a draggable panel that we set up. It goes horizontally and is used for 3 sets of items. These items are not added dynamically and they all sit inside the Grid (UIGrid) gameObject. I am calling a function that enables the items that belong to a specific category and then resorting using UIDraggablePanel.ResetPosition().

The weird behavior occurs only on iOS devices; it seems to work just fine in the editor, even when using Unity Remote (both for iOS and Android). When we build to the iPad or iPhone, on all devices we have tried, things start to go wrong.

As I mentioned previously, there are 3 categories; the last one has the same amount, if not more, as the other two combined. This means that the 3rd and problematic category is especially long. What ends up happening on iOS, is that the first 6-7 items seem to be duplicated and layered on top of the last 6-7 items, yet they are invisible. They scroll along with the rest of the contents, and you can tell that it's layered on top of the last bunch of items because you can actually select those items underneath by trying to select between the space of the invisible items on top. They are also off center, the Y is a little bit lower so if you select the item around the top, you will be able to select it, but as you move your touches down, you can tell that it's being impeded by the invisible colliders of the first bunch of items. I know it's the first set of items because clicking on the colliders updates a texture on a character, and it's showing the textures of the first set of items.

I hope I was able to explain that properly, I am going to try and mock up what's happening (I can't disclose much because of my contract). I really hope we can get some help on this because we need to send this game off to Apple Review and this is a big bug that's delaying the release. Thank you.

rain

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 4
  • Posts: 79
    • View Profile
I think posting a few screenshots wouldn't hurt :D

JosephFerano

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 27
    • View Profile
Ok, here are two screenshots. The first shows the panel as it is viewed normally. The second image shows the ghosted colliders that are showing up. They drag with the rest of the panel and are laid on top of other items, yet they are invisible.

I would really appreciate some help. Thank you guys.

JosephFerano

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 27
    • View Profile
I think posting a few screenshots wouldn't hurt :D

Yeah, I was preparing some. Hope this helps.

JosephFerano

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 27
    • View Profile
By the way, I am on NGUI 2.0.8, so I'm not very up to date, however, the other programmer we had on this project edited some stuff on NGUI, so what would be a good way to keep those changes while updating?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Unity remote sends both mouse and touch events -- essentially doubling the amount of events you get (one event = two events). It's weird, but that's just how it is. I highly suggest you update to 2.2.2. Your version is many months out of date.

JosephFerano

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 27
    • View Profile
That's unfortunate, what would be the best way of keeping the changes we've made to NGUI and updating?

JosephFerano

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 27
    • View Profile
Ok, I tried updating and the problem persists. Still getting the exact same behavior. Any ideas?

JosephFerano

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 27
    • View Profile
I changed the category of some of the items to "none" and the following behavior is somewhat consistent; the shorter the list is from right to left, the more the ghost colliders are pushed to the right. Meaning that the ghost colliders start further at the end of list of items. Could this be some far off camera that's capturing some of this data or something?

JosephFerano

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 27
    • View Profile
Nevermind, I fixed it. There was a UIRoot pulled off way to the side and items were reaching that camera and the reason I wasn't able to replicate it is because that UIRoot persists between levels and its position was different in the scene where it starts on the iOS device.