Exemple #1
0
        // Token: 0x060003B5 RID: 949 RVA: 0x00033198 File Offset: 0x00031398
        private Dictionary <string, int> CountRendererInScene()
        {
            Dictionary <string, int> dictionary = new Dictionary <string, int>();

            foreach (GameObject gameObject in EditorUtility2.GetSceneRootObjects())
            {
                this.CountRendererInSceneRecursive(gameObject.transform, dictionary);
            }
            return(dictionary);
        }
Exemple #2
0
        // Token: 0x060003B4 RID: 948 RVA: 0x00033044 File Offset: 0x00031244
        private void DoPickModeChange(MainWindow.PickMode newpickmode, bool checkTimeStamp)
        {
            this._listview.SetSceneOccurrenceLookup(null);
            switch (newpickmode)
            {
            case MainWindow.PickMode.Selection:
                this._listview.SetItems(new List <string>());
                this.OnSelectionChange();
                break;

            case MainWindow.PickMode.Project:
                this._listview.SetItems(new List <string>(AssetDatabase.GetAllAssetPaths()));
                break;

            case MainWindow.PickMode.Scene:
            {
                List <Object> list = new List <Object>(EditorUtility.CollectDependencies(EditorUtility2.GetSceneRootObjects().ToArray()));
                if (RenderSettings.skybox != null)
                {
                    list.AddRange(EditorUtility.CollectDependencies(new Material[]
                        {
                            RenderSettings.skybox
                        }));
                }
                if (Globals.CountRendererInSceneMode)
                {
                    Dictionary <string, int> sceneOccurrenceLookup = this.CountRendererInScene();
                    this._listview.SetSceneOccurrenceLookup(sceneOccurrenceLookup);
                }
                List <string> list2 = new List <string>(128);
                foreach (Object @object in list)
                {
                    if (@object is Texture)
                    {
                        string assetPath = AssetDatabase.GetAssetPath(@object);
                        if (!string.IsNullOrEmpty(assetPath))
                        {
                            list2.Add(assetPath);
                        }
                    }
                }
                this._listview.SetItems(list2);
                break;
            }

            case MainWindow.PickMode.AssetBundleManifest:
                this._listview.SetItems(new List <string>());
                break;
            }
            this.UpdateMemoryUsage();
        }