Hi @all
Currently I have a strange behave, when I try to add prefabs with a UIDrag Panel Content Object attached per script to a UIGrid. Here is my code to add a prefab to the grid:
GameObject item = NGUITools.AddChild(ListGrid.gameObject, prefabEntry);
item.GetComponent<UIDragPanelContents>().draggablePanel = DraggablePanel;
UILabel label = item.transform.FindChild("Label").GetComponent<UILabel>();
When I run this code on runtime, then the items of the grid are not movable. They don't react on mouse events when I try to scroll the grid content up and down.
When I add the same prefab(s) to the grid in the Editor, then it works without any problem. Has anyone an idea what I forgot? Currently I use NGUI 2.6.1e
Cheers, EdLan