Author Topic: Drag and Drop problem  (Read 6790 times)

leegod

  • Jr. Member
  • **
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 90
    • View Profile
Drag and Drop problem
« on: February 28, 2017, 06:34:55 AM »
Hi.
As you can see in this video,

https://youtu.be/BYOUw-_xhlQ


1.
When I register card from below panel to above panel, (both ngui include card images)
Card image's upper and below part disaapears and can't be seen.
How to fix this?

2.
And when I click card and drag, it should be shown above all GUI, but it does not show and when I release, it reappear and come back to below or above panel.
How to show it when I dragging?

Thanks.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Drag and Drop problem
« Reply #1 on: March 01, 2017, 03:31:21 PM »
Looks to me like you're using a clipped panel that clips your UI, but you must be using a non-NGUI shader on the font that prevents it from being clipped.

leegod

  • Jr. Member
  • **
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 90
    • View Profile
Re: Drag and Drop problem
« Reply #2 on: March 01, 2017, 10:33:56 PM »
Looks to me like you're using a clipped panel that clips your UI, but you must be using a non-NGUI shader on the font that prevents it from being clipped.
Thanks, so I changed its panel option to [dont clip], so when moved at above panel, it shows all.

1. But still I can't click it, why. Box collider still lived.

2. and when I click and drag card below, it does not show with mouse movement. How can I show it most front above on camera?

leegod

  • Jr. Member
  • **
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 90
    • View Profile
Re: Drag and Drop problem
« Reply #3 on: March 02, 2017, 12:52:16 AM »
So I am using 2 drag and drop root, so disappear problem when dragging is solved when I turn one root off.

But now new problem, as you can see at this video,

 https://youtu.be/hN781kAAsyA

Dragging just stops right after mouse dragging even if I didn't released mouse left button.


leegod

  • Jr. Member
  • **
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 90
    • View Profile
Re: Drag and Drop problem
« Reply #4 on: March 02, 2017, 01:38:42 AM »
So I am using 2 drag and drop root, so disappear problem when dragging is solved when I turn one root off.

But now new problem, as you can see at this video,

 https://youtu.be/hN781kAAsyA

Dragging just stops right after mouse dragging even if I didn't released mouse left button.

Why draggin card object come back immediately?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Drag and Drop problem
« Reply #5 on: March 06, 2017, 05:11:22 PM »
I don't know, you tell me, it's your setup :P -- Did you forget to add UICamera to your 3D game camera? You need a UICamera on all cameras, not just the UI.

Have you looked at the drag & drop example that comes with NGUI? It handles dragging of things from one scroll view to another and onto 3D objects.

leegod

  • Jr. Member
  • **
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 90
    • View Profile
Re: Drag and Drop problem
« Reply #6 on: March 08, 2017, 05:21:02 AM »
So it was because I have 2 dragdropROOT gameobject and script in one scene. This is because originally 2 ngui scene made from different developer and integrated them in one scene.

So I turned one d&d Root script off and now drag and drop works well.

But I doubt this also work when I change camera and show different ngui UIRoot scene in one scene.