Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: pcutile on November 21, 2014, 07:21:00 PM
-
i use a gameobject with a script ExampleDragDropItem connected. the object is in a UIRoot (3d) and is clearly visible and clickable. external to the uiroot there is a script UIDragDropRoot. Problem is seen when I run and I click on the icon Exampledragdropitem, the icon does not follow the mouse pointer and the X-coordinate is reversed. When I release the mouse button, the 'object is instantiated in the right spot, only the' icon does not follow the mouse, because it goes in the opposite x
-
Alright first, drag & drop is meant to work with 2D UIs, not 3D. I don't know if its code will even work with 3D ones. If you want 3D UI drag & drop, look at the character example scene. It does drag & drop differently there.
Next, the UIDragDropRoot should still be a part of your UI. You shouldn't be placing it outside of it. UIDragDropRoot should be on a child panel -- a panel with higher depth.