Пример #1
0
        // ~~~~~ UI Callbacks ~~~~~

        internal void OnSearchClicked()
        {
            m_resultListPageHandler.CurrentPage = 0;

            if (m_context == SearchContext.StaticClass)
            {
                m_results = SearchProvider.StaticClassSearch(m_nameInput.text);
            }
            else if (m_context == SearchContext.Singleton)
            {
                m_results = SearchProvider.SingletonSearch(m_nameInput.text);
            }
            else
            {
                m_results = SearchProvider.UnityObjectSearch(m_nameInput.text, m_customTypeInput.text, m_context, m_childFilter, m_sceneFilter);
            }

            if (m_results == null)
            {
                m_results = new object[0];
            }

            RefreshResultList();

            if (m_results.Length > 0)
            {
                m_resultCountText.text = $"{m_results.Length} Results";
            }
            else
            {
                m_resultCountText.text = "No results...";
            }
        }