Author Topic: MAJOR UIDraggablePanel/Clipped View ISSUE  (Read 2143 times)

m3taphysics

  • Guest
MAJOR UIDraggablePanel/Clipped View ISSUE
« on: October 04, 2012, 05:45:50 PM »
Hi Sorry to be blunt but I have delivery for a project tomorrow. This is the first project I have decided to use nGUI in and the client is expecting a final build tomorrow. After having spent all night (and various nights though the week trying to solve it) I havent gotten anywhere, Ive only managed to narrow down the issue:

UIPanel1 -> UIButton -> UISlicedSprite
UIPanel2 -> UIGrid -> UIDragPanelContents

For some reason for clipping (and disappearing of the drag panel contents) I have to separate out the Z value of the UIPanel2 from UIPanel1 by about 100 units. This then means it clips contents correctly and I have no issues with the rendering. BUT because this is now so far infront, the button cannot be clicked when the UIDragPanelContents overlay the button.

So if I move the button in FRONT of the UIGrid, it dissapears. Although it doesnt seem localised to a UIButton, if in the other panel I disable all UISlicedSprites, the issue goes away too.

I am fighting with clipping and the button not being able to be pressed.

There are NO UIPanels within my UIPanels, which could be causing an issue. (as ive read).

Basically to fix the issue in editor while its playing. I go to the UIPanel1 and begin disabling UISlicedSprite until eventually the clipping issue resolves and the "dissapearing text" issue goes away. It only happens WHILE scrolling, if I stop scrolling, text re-appears. Resulting in flickering text as I move the mouse up and down.


Ran out of ideas and its 12am, been working for 17 hours straight and no solution. Client delivery in 9 hours.


Thanks

m3taphysics

  • Guest
Re: MAJOR UIDraggablePanel/Clipped View ISSUE
« Reply #1 on: October 04, 2012, 05:46:39 PM »
Note: everything is on the same atlas

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: MAJOR UIDraggablePanel/Clipped View ISSUE
« Reply #2 on: October 05, 2012, 08:43:49 AM »
Did you try tilting your editor camera so that you see what's on top of what in 3D space? Most often than not, this kind of an issue is caused by some game object that you offset along the Z and forgot about. 100 units is very excessive. Even an offset by -1 would address the "what's in front" issue.

If you move a button in front of UIGrid and the grid disappears, it suggests that your button is on the same panel as the background object. Take this for example:

UIPanel 1
- Background
- Button

UIPanel 2 (clipped)
- Grid

UIPanel 1 draws both the background and the button in one go. You can't have it be like this:

Background
- Grid
-- Button

...simply because Background and Button is in the same draw call.

Solution? Add another panel.

Background (Panel 1)
- Grid (clipped Panel 2)
-- Button (Panel 3)