// Token: 0x060003B3 RID: 947 RVA: 0x00032FEC File Offset: 0x000311EC private void OnPickModeChange(GUIControl sender) { GUIToolbarPopup guitoolbarPopup = (GUIToolbarPopup)sender; this.SetLock(false); this._pickmode = (MainWindow.PickMode)guitoolbarPopup.SelectedItem.Tag; EditorPrefs.SetInt(string.Format("{0}.PickMode", Globals.ProductId), (int)this._pickmode); this.DoPickModeChange(this._pickmode, false); }
// Token: 0x0600038F RID: 911 RVA: 0x00031F78 File Offset: 0x00030178 protected override void __OnCreate() { BuildTargetGroup @int = (BuildTargetGroup)EditorPrefs.GetInt(string.Format("{0}.Platform", Globals.ProductId), 0); this._listview = new Listbox(this, null); this._listview.EditorPrefsPath = string.Format("{0}.ListView", Globals.ProductId); this._listview.LoadPrefs(); this._listview.EmptyText = "Loading texture importer settings. Please wait..."; this._listview.SetPlatform(@int); this._menu = new GUIToolbar(this, null); GUIToolbarMenu guitoolbarMenu = this._menu.AddMenu("Tools", "", null); guitoolbarMenu.Add(new GUIToolbarMenuItem("Export as CSV...", new Action <GUIToolbarMenuItem>(this.OnToolsExportCsvExecute))); guitoolbarMenu.Add(new GUIToolbarMenuItem("Memory Usage", new Action <GUIToolbarMenuItem>(this.OnToolsMemoryUsageExecute), new Func <GUIToolbarMenuItem, GUIControlStatus>(this.OnToolsMemoryUsageQuery))); guitoolbarMenu.Add(new GUIToolbarMenuItem("Issue Detection/Warn Compression Fail", new Action <GUIToolbarMenuItem>(this.OnWarningsCompressionFailExecute), new Func <GUIToolbarMenuItem, GUIControlStatus>(this.OnWarningsCompressionFailQuery))); guitoolbarMenu.Add(new GUIToolbarMenuItem("Issue Detection/Warn Lossy Compressed Source Texture", new Action <GUIToolbarMenuItem>(this.OnWarningsLossyCompressedSourceTextureExecute), new Func <GUIToolbarMenuItem, GUIControlStatus>(this.OnWarningsLossyCompressedSourceTextureQuery))); guitoolbarMenu.Add(new GUIToolbarMenuItem("Issue Detection/Warn Legacy Cubemap", new Action <GUIToolbarMenuItem>(this.OnWarningsLegacyCubemapExecute), new Func <GUIToolbarMenuItem, GUIControlStatus>(this.OnWarningsLegacyCubemapQuery))); guitoolbarMenu.Add(GUIToolbarMenuItem.Separator); guitoolbarMenu.Add(new GUIToolbarMenuItem("Advanced/Show assets from Editor directories", new Action <GUIToolbarMenuItem>(this.OnToolsShowEditorAssetsExecute), new Func <GUIToolbarMenuItem, GUIControlStatus>(this.OnToolsShowEditorAssetsQuery))); guitoolbarMenu.Add(new GUIToolbarMenuItem("Advanced/Show assets from Packages", new Action <GUIToolbarMenuItem>(this.OnToolsShowPackageAssetsExecute), new Func <GUIToolbarMenuItem, GUIControlStatus>(this.OnToolsShowPackageAssetsQuery))); guitoolbarMenu.Add(new GUIToolbarMenuItem("Advanced/Count Renderer (Scene mode only, EXPERIMENTAL)", new Action <GUIToolbarMenuItem>(this.OnToolsCountRendererExecute), new Func <GUIToolbarMenuItem, GUIControlStatus>(this.OnToolsCountRendererQuery))); guitoolbarMenu.Add(new GUIToolbarMenuItem("Advanced/Handle RGB24 as RGBA32 on GPU", new Action <GUIToolbarMenuItem>(this.OnToolsGpuExpandRgb24ToRgba32Execute), new Func <GUIToolbarMenuItem, GUIControlStatus>(this.OnToolsGpuExpandRgb24ToRgba32Query))); guitoolbarMenu.Add(new GUIToolbarMenuItem("Advanced/Rebuild Texture Overview Cache...", new Action <GUIToolbarMenuItem>(this.OnToolsRebuildCacheExecute))); guitoolbarMenu.Add(GUIToolbarMenuItem.Separator); guitoolbarMenu.Add(new GUIToolbarMenuItem("About", new Action <GUIToolbarMenuItem>(this.OnToolsAbout))); this._pickmode = (MainWindow.PickMode)EditorPrefs.GetInt(string.Format("{0}.PickMode", Globals.ProductId), (int)this._pickmode); GUIToolbarPopup guitoolbarPopup = this._menu.AddPopup("", "Select from where to list textures.", new GUIControlExecuteDelegate(this.OnPickModeChange)); guitoolbarPopup.Items = new GUIToolbarPopupItem[] { new GUIToolbarPopupItem("Project", MainWindow.PickMode.Project), new GUIToolbarPopupItem("Scene", MainWindow.PickMode.Scene), new GUIToolbarPopupItem("Selection", MainWindow.PickMode.Selection), new GUIToolbarPopupItem("AssetBundle Manifest", MainWindow.PickMode.AssetBundleManifest) }; guitoolbarPopup.SelectTag(this._pickmode); this._lockbutton = this._menu.AddButton("", "Selection changes within the Unity Project or Hierachy window have no impact on the list when it is locked.", null, new GUIControlExecuteDelegate(this.OnLockToggle), new GUIControlQueryStatusDelegate(this.OnQueryLockToggle)); this._lockbutton.ImageSize = new Vector2(13f, 13f); this.SetLock(false); GUIToolbarButton guitoolbarButton = this._menu.AddButton("Refresh", "Get new snapshot of all textures used by GameObjects at this moment.", EditorFramework.Images.Refresh16x16, new GUIControlExecuteDelegate(this.OnRefreshScene), new GUIControlQueryStatusDelegate(this.OnQueryRefreshScene)); guitoolbarButton.ImageSize = new Vector2(13f, 13f); this._menu.AddSpace(8f); this._menu.AddFlexibleSpace(); this._searchfield = this._menu.AddSearchField("", null, new GUIControlExecuteDelegate(this.OnSearchChange), null); this._searchfield.SearchModes = new string[] { "Search in All", "Search in Name", "Search in Path", "Search in Sprite Packing Tag" }; this._searchfield.SearchMode = EditorPrefs.GetInt(string.Format("{0}.TextFilterMode", Globals.ProductId), 0); this._searchfield.LayoutOptions = new GUILayoutOption[] { GUILayout.MinWidth(50f), GUILayout.MaxWidth(5000f), GUILayout.ExpandWidth(true) }; this._searchfield.AcceptDrop = true; this._typeMenu = this._menu.AddMenu("", "Filter by Type", null); foreach (Listbox.TypeFilter typeFilter in new Listbox.TypeFilter[] { new Listbox.TypeFilter("Default", (TextureImporterType)0, (TextureImporterShape)1), new Listbox.TypeFilter("Normal map", (TextureImporterType)1, (TextureImporterShape)1), new Listbox.TypeFilter("Editor GUI & Legacy UI", (TextureImporterType)2, (TextureImporterShape)1), new Listbox.TypeFilter("Sprite (2D & UI)", (TextureImporterType)8, (TextureImporterShape)1), new Listbox.TypeFilter("Cubemap", 0, (TextureImporterShape)2), new Listbox.TypeFilter("Cursor", (TextureImporterType)7, (TextureImporterShape)1), new Listbox.TypeFilter("Cookie", (TextureImporterType)4, (TextureImporterShape)1), new Listbox.TypeFilter("Lightmap", (TextureImporterType)6, (TextureImporterShape)1), new Listbox.TypeFilter("Single Channel", (TextureImporterType)10, (TextureImporterShape)1) }) { GUIToolbarMenuItem guitoolbarMenuItem = new GUIToolbarMenuItem(typeFilter.Name.Replace("&", "and"), new Action <GUIToolbarMenuItem>(this.OnTypeFilterExecute), new Func <GUIToolbarMenuItem, GUIControlStatus>(this.OnQueryTypeFilter)); guitoolbarMenuItem.Tag = typeFilter; this._typeMenu.Add(guitoolbarMenuItem); } this._typeMenu.Add(GUIToolbarMenuItem.Separator); this._typeMenu.Add(new GUIToolbarMenuItem("Reset Type Filter", new Action <GUIToolbarMenuItem>(this.OnTypeFilterResetExecute)) { Tag = 1 }); this._typeMenu.Image = EditorGUIUtility.FindTexture("FilterByType"); if (this._typeMenu.Image != null) { this._typeMenu.ImageSize = new Vector2((float)this._typeMenu.Image.width, (float)this._typeMenu.Image.height); } this._menu.AddSpace(8f); GUIToolbarRadioGroup guitoolbarRadioGroup = this._menu.AddRadioGroup(); GUIToolbarRadioButton guitoolbarRadioButton = guitoolbarRadioGroup.AddButton("Default", "Default settings", null, new GUIControlExecuteDelegate(this.OnPlatformChange)); guitoolbarRadioButton.Tag = 0; GUIToolbarRadioButton control = guitoolbarRadioButton; List <BuildPlatform2> validPlatforms = BuildPlayerWindow2.GetValidPlatforms(); foreach (BuildPlatform2 buildPlatform in validPlatforms) { GUIToolbarRadioButton guitoolbarRadioButton2 = guitoolbarRadioGroup.AddButton("", buildPlatform.DisplayName + " settings", buildPlatform.SmallIcon as Texture2D, new GUIControlExecuteDelegate(this.OnPlatformChange)); guitoolbarRadioButton2.Tag = buildPlatform.TargetGroup; if (buildPlatform.TargetGroup == @int) { control = guitoolbarRadioButton2; } } guitoolbarRadioGroup.OnCheckedControl(control); this._bottommenu = new GUIToolbar(this, null); this._statslabel = this._bottommenu.AddLabel(); this._bottommenu.AddFlexibleSpace(); this._searchlabel = this._bottommenu.AddLabel(); this._bottommenu.AddSpace(9f); this._memoryUsage = new TextureMemoryUsageOverlay(); this._issueOverlay = new TextureIssueOverlay(); this._manifestGUI = new AssetBundleManifestUI(); this._manifestGUI.EditorPrefsPath = string.Format("{0}.AssetBundleManifest", Globals.ProductId); this._manifestGUI.Init(this); this._manifestGUI.SelectionChange = new Action <List <AssetBundleManifest2> >(this.OnShowAssetBundleManifestContent); }