コード例 #1
0
 static public int OnTransformChildrenChanged(IntPtr l)
 {
     try {
         UnityEngine.UI.Extensions.ReorderableListContent self = (UnityEngine.UI.Extensions.ReorderableListContent)checkSelf(l);
         self.OnTransformChildrenChanged();
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #2
0
 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));
     }
 }
コード例 #3
0
 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);
 }
コード例 #4
0
 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);
 }
コード例 #5
0
 /// <summary>
 /// Refresh related list content
 /// </summary>
 public void Refresh()
 {
     _listContent = ContentLayout.gameObject.GetOrAddComponent <ReorderableListContent>();
     _listContent.Init(this);
 }
コード例 #6
0
 /// <summary>
 /// Refresh related list content
 /// </summary>
 public void Refresh()
 {
     Destroy(_listContent);
     _listContent = ContentLayout.gameObject.AddComponent <ReorderableListContent>();
     //_listContent.Init(this);
 }