示例#1
0
        protected int UF_CacheSortingRoot()
        {
            Transform parent = this.transform.parent;

            while (parent != null)
            {
                ISortingRoot root = parent.GetComponent <ISortingRoot>();
                if (root != null && root.isActiveAndEnabled && root.isSortingValidate)
                {
                    m_SortingRoot    = root;
                    m_CacheRootOrder = root.sortingOrder;
                    break;
                }
                parent = parent.parent;
            }
            return(0);
        }
示例#2
0
 protected override void OnDisable()
 {
     base.OnDisable();
     m_SortingRoot    = null;
     m_CacheRootOrder = 0;
 }