예제 #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;
 }