UnityEditor.HierarchyProperty.NextWithDepthCheck C# (CSharp) Method

NextWithDepthCheck() private method

private NextWithDepthCheck ( int expanded, int minDepth ) : bool
expanded int
minDepth int
return bool
        public extern bool NextWithDepthCheck(int[] expanded, int minDepth);
        [MethodImpl(MethodImplOptions.InternalCall)]

Usage Example

Exemplo n.º 1
0
        void SearchInFolders(HierarchyProperty property)
        {
            List <FilterResult> list = new List <FilterResult>();

            string[] baseFolders = ProjectWindowUtil.GetBaseFolders(m_SearchFilter.folders);

            foreach (string folderPath in baseFolders)
            {
                // Ensure we do not have a filter when finding folder
                property.SetSearchFilter(new SearchFilter());

                int folderInstanceID = AssetDatabase.GetMainAssetInstanceID(folderPath);
                if (property.Find(folderInstanceID, null))
                {
                    // Set filter after we found the folder
                    property.SetSearchFilter(m_SearchFilter);
                    int   folderDepth = property.depth;
                    int[] expanded    = null; // enter all children of folder
                    while (property.NextWithDepthCheck(expanded, folderDepth + 1))
                    {
                        FilterResult result = new FilterResult();
                        CopyPropertyData(ref result, property);
                        list.Add(result);
                    }
                }
            }
            m_Results = list.ToArray();
        }
All Usage Examples Of UnityEditor.HierarchyProperty::NextWithDepthCheck