void Update()
        {
            try
            {
                if (m_needsRefresh)
                {
                    try
                    {
                        if (m_buildInfo != null)
                        {
                            m_assets       = Refresh(m_buildInfo, m_referenceBuildInfo);
                            m_assetsByPath = m_assets.ToDictionary(x => x.info.path);

                            m_needsDataPostprocessing = true;
                        }
                    }
                    finally
                    {
                        m_needsRefresh = false;
                        m_needsSorting = true;
                    }
                }

                if (m_needsDataPostprocessing)
                {
                    foreach (var asset in m_assets)
                    {
                        asset.dependencies.Clear();
                        asset.references.Clear();
                        asset.scenes.Clear();
                    }

                    int controlId = 20000000;
                    foreach (var asset in m_assets)
                    {
                        asset.controlId = controlId++;

                        foreach (var dep in asset.info.dependencies)
                        {
                            AssetEntry info;
                            if (m_assetsByPath.TryGetValue(dep, out info))
                            {
                                asset.dependencies.Add(info);
                                info.references.Add(asset);
                            }
                        }

                        foreach (var sceneName in asset.info.scenes)
                        {
                            AssetEntry scene;
                            if (m_assetsByPath.TryGetValue(sceneName, out scene))
                            {
                                asset.scenes.Add(scene);
                            }
                        }
                    }

                    m_needsDataPostprocessing = false;
                    m_needsSelectionRefresh   = true;
                }

                if (m_needsSorting != false)
                {
                    if (m_needsSorting == true)
                    {
                        Sort(m_assets, m_sorts);
                    }
                    else
                    {
                        // just reverse
                        m_assets.Reverse();
                    }

                    m_needsSorting   = false;
                    m_needsFiltering = true;
                }

                if (m_needsFiltering)
                {
                    var minSize = FileSize.FromKiloBytes(ui.minSizeMB * 1024.0f);

                    FileSize?maxSize = null;
                    if (!Utils.NearlyEqual(ui.maxSizeMB, Skin.MaxSizeMB))
                    {
                        maxSize = FileSize.FromKiloBytes(ui.maxSizeMB * 1024.0f);
                    }

                    m_categoriesTree = null;
                    m_filteredAssets.Clear();

                    FilterAssets(m_filteredAssets, m_assets, minSize, maxSize, m_categories.selected, m_scenes.selected, ui.exclusiveScenesFilter, ui.assetsFilter, m_detailsInfo.names);

                    m_filteredTotalSize = m_filteredAssets.Sum(x => x.size);

                    m_needsFiltering     = false;
                    ui.prevSelectedIndex = -1;
                }

                TryRefreshSelection();
            }
            catch (System.Exception ex)
            {
                Debug.LogException(ex);
                m_error = ex;
            }
        }