static public int Init(IntPtr l) { try { UnityEngine.UI.Extensions.ReorderableListContent self = (UnityEngine.UI.Extensions.ReorderableListContent)checkSelf(l); UnityEngine.UI.Extensions.ReorderableList a1; checkType(l, 2, out a1); self.Init(a1); return(0); } catch (Exception e) { return(error(l, e)); } }
private void Awake() { if (ContentLayout == null) { Debug.LogError("You need to have a child LayoutGroup content set for the list: " + name, gameObject); return; } if (DraggableArea == null) { DraggableArea = transform.root.GetComponentInChildren <Canvas>().GetComponent <RectTransform>(); } if (IsDropable && !GetComponent <Graphic>()) { Debug.LogError("You need to have a Graphic control (such as an Image) for the list [" + name + "] to be droppable", gameObject); return; } _listContent = ContentLayout.gameObject.AddComponent <ReorderableListContent>(); _listContent.Init(this); }
private void Awake() { if (ContentLayout == null) { Debug.LogError("You need to have a child LayoutGroup content set for the list: " + base.name, base.gameObject); return; } if (DraggableArea == null) { DraggableArea = base.transform.root.GetComponentInChildren <Canvas>().GetComponent <RectTransform>(); } if (IsDropable && !GetComponent <Graphic>()) { Debug.LogError("You need to have a Graphic control (such as an Image) for the list [" + base.name + "] to be droppable", base.gameObject); return; } if (GetCanvas().renderMode != 0) { Debug.LogError("The ReOrderable List is only supported on a Screenspace-Overlay Canvas at the moment"); } _listContent = ContentLayout.gameObject.AddComponent <ReorderableListContent>(); _listContent.Init(this); }
/// <summary> /// Refresh related list content /// </summary> public void Refresh() { _listContent = ContentLayout.gameObject.GetOrAddComponent <ReorderableListContent>(); _listContent.Init(this); }