コード例 #1
0
        void OnPanelHierarchyChanged(VisualElement ve, HierarchyChangeType changeType)
        {
            if (renderChain == null)
            {
                return;
            }

            switch (changeType)
            {
            case HierarchyChangeType.Add:
                renderChain.UIEOnChildAdded(ve.hierarchy.parent, ve, ve.hierarchy.parent != null ? ve.hierarchy.parent.IndexOf(ve) : 0);
                break;

            case HierarchyChangeType.Remove:
                renderChain.UIEOnChildRemoving(ve);
                break;

            case HierarchyChangeType.Move:
                renderChain.UIEOnChildrenReordered(ve);
                break;
            }
        }