Compare commits

..

No commits in common. "12bd282ace541261ef36d6e929f0a830059a9592" and "57d1e92e59071ef7055ce98243b5f9ca01666f87" have entirely different histories.

10 changed files with 57 additions and 187 deletions

View File

@ -80,7 +80,7 @@ namespace YooAsset.Editor
} }
public int CompareTo(object other) public int CompareTo(object other)
{ {
if (other is WhiteListBtnCell cell) if (other is PassesBtnCell cell)
{ {
return this.Element.IsWhiteList.CompareTo(cell.Element.IsWhiteList); return this.Element.IsWhiteList.CompareTo(cell.Element.IsWhiteList);
} }
@ -92,9 +92,8 @@ namespace YooAsset.Editor
} }
private ToolbarSearchField _searchField; private ToolbarSearchField _searchField;
private Button _showHiddenBtn; private Button _whiteVisibleBtn;
private Button _whiteListVisibleBtn; private Button _stateVisibleBtn;
private Button _passesVisibleBtn;
private Label _titleLabel; private Label _titleLabel;
private Label _descLabel; private Label _descLabel;
private TableView _elementTableView; private TableView _elementTableView;
@ -102,9 +101,9 @@ namespace YooAsset.Editor
private ScanReportCombiner _reportCombiner; private ScanReportCombiner _reportCombiner;
private string _lastestOpenFolder; private string _lastestOpenFolder;
private List<ITableData> _sourceDatas; private List<ITableData> _sourceDatas;
private bool _elementVisibleState = true; private bool _showWhiteElements = true;
private bool _whiteListVisibleState = true; private bool _showPassesElements = true;
private bool _passesVisibleState = true;
public void CreateGUI() public void CreateGUI()
{ {
@ -131,13 +130,11 @@ namespace YooAsset.Editor
var fixSelectBtn = root.Q<Button>("FixSelectButton"); var fixSelectBtn = root.Q<Button>("FixSelectButton");
fixSelectBtn.clicked += FixSelectBtn_clicked; fixSelectBtn.clicked += FixSelectBtn_clicked;
// 可见性按钮 // 白名单按钮
_showHiddenBtn = root.Q<Button>("ShowHiddenButton"); _whiteVisibleBtn = root.Q<Button>("WhiteVisibleButton");
_showHiddenBtn.clicked += ShowHiddenBtn_clicked; _whiteVisibleBtn.clicked += WhiteVisibleBtn_clicked;
_whiteListVisibleBtn = root.Q<Button>("WhiteListVisibleButton"); _stateVisibleBtn = root.Q<Button>("StateVisibleButton");
_whiteListVisibleBtn.clicked += WhiteListVisibleBtn_clicked; _stateVisibleBtn.clicked += StateVsibleBtn_clicked;
_passesVisibleBtn = root.Q<Button>("PassesVisibleButton");
_passesVisibleBtn.clicked += PassesVsibleBtn_clicked;
// 文件导出按钮 // 文件导出按钮
var exportFilesBtn = root.Q<Button>("ExportFilesButton"); var exportFilesBtn = root.Q<Button>("ExportFilesButton");
@ -153,7 +150,7 @@ namespace YooAsset.Editor
// 列表相关 // 列表相关
_elementTableView = root.Q<TableView>("TopTableView"); _elementTableView = root.Q<TableView>("TopTableView");
_elementTableView.ClickTableDataEvent = OnClickTableViewItem; _elementTableView.ClickTableDataEvent = OnClickListItem;
_lastestOpenFolder = EditorTools.GetProjectPath(); _lastestOpenFolder = EditorTools.GetProjectPath();
} }
@ -256,21 +253,15 @@ namespace YooAsset.Editor
_reportCombiner.FixSelect(); _reportCombiner.FixSelect();
} }
} }
private void ShowHiddenBtn_clicked() private void WhiteVisibleBtn_clicked()
{ {
_elementVisibleState = !_elementVisibleState; _showWhiteElements = !_showWhiteElements;
RefreshToolbar(); RefreshToolbar();
RebuildView(); RebuildView();
} }
private void WhiteListVisibleBtn_clicked() private void StateVsibleBtn_clicked()
{ {
_whiteListVisibleState = !_whiteListVisibleState; _showPassesElements = !_showPassesElements;
RefreshToolbar();
RebuildView();
}
private void PassesVsibleBtn_clicked()
{
_passesVisibleState = !_passesVisibleState;
RefreshToolbar(); RefreshToolbar();
RebuildView(); RebuildView();
} }
@ -292,23 +283,15 @@ namespace YooAsset.Editor
_titleLabel.text = _reportCombiner.ReportTitle; _titleLabel.text = _reportCombiner.ReportTitle;
_descLabel.text = _reportCombiner.ReportDesc; _descLabel.text = _reportCombiner.ReportDesc;
var enableColor = new Color32(18, 100, 18, 255); if (_showWhiteElements)
var disableColor = new Color32(100, 100, 100, 255); _whiteVisibleBtn.style.backgroundColor = new StyleColor(new Color32(56, 147, 58, 255));
if (_elementVisibleState)
_showHiddenBtn.style.backgroundColor = new StyleColor(enableColor);
else else
_showHiddenBtn.style.backgroundColor = new StyleColor(disableColor); _whiteVisibleBtn.style.backgroundColor = new StyleColor(new Color32(100, 100, 100, 255));
if (_whiteListVisibleState) if (_showPassesElements)
_whiteListVisibleBtn.style.backgroundColor = new StyleColor(enableColor); _stateVisibleBtn.style.backgroundColor = new StyleColor(new Color32(56, 147, 58, 255));
else else
_whiteListVisibleBtn.style.backgroundColor = new StyleColor(disableColor); _stateVisibleBtn.style.backgroundColor = new StyleColor(new Color32(100, 100, 100, 255));
if (_passesVisibleState)
_passesVisibleBtn.style.backgroundColor = new StyleColor(enableColor);
else
_passesVisibleBtn.style.backgroundColor = new StyleColor(disableColor);
} }
private void FillTableView() private void FillTableView()
{ {
@ -317,63 +300,27 @@ namespace YooAsset.Editor
_elementTableView.ClearAll(true, true); _elementTableView.ClearAll(true, true);
// 眼睛标题 // 状态标题
{ {
var columnStyle = new ColumnStyle(); var columnStyle = new ColumnStyle();
columnStyle.Width = 20; columnStyle.Width = 80;
columnStyle.MinWidth = 20; columnStyle.MinWidth = 80;
columnStyle.MaxWidth = 20; columnStyle.MaxWidth = 80;
columnStyle.Stretchable = false;
columnStyle.Searchable = false;
columnStyle.Sortable = false;
columnStyle.TxtAnchor = TextAnchor.MiddleCenter;
var column = new TableColumn("眼睛框", string.Empty, columnStyle);
column.MakeCell = () =>
{
var toggle = new DisplayToggle();
toggle.text = string.Empty;
toggle.style.marginLeft = 3f;
toggle.style.unityTextAlign = columnStyle.TxtAnchor;
toggle.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
toggle.style.width = columnStyle.Width;
toggle.style.maxWidth = columnStyle.MaxWidth;
toggle.style.minWidth = columnStyle.MinWidth;
toggle.RegisterValueChangedCallback((evt) => { OnDisplayToggleValueChange(toggle, evt); });
return toggle;
};
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
{
var toggle = element as DisplayToggle;
toggle.userData = data;
var tableData = data as ElementTableData;
toggle.SetValueWithoutNotify(tableData.Element.Hidden);
toggle.RefreshIcon();
};
_elementTableView.AddColumn(column);
}
// 通过标题
{
var columnStyle = new ColumnStyle();
columnStyle.Width = 70;
columnStyle.MinWidth = 70;
columnStyle.MaxWidth = 70;
columnStyle.Stretchable = false; columnStyle.Stretchable = false;
columnStyle.Searchable = false; columnStyle.Searchable = false;
columnStyle.Sortable = true; columnStyle.Sortable = true;
columnStyle.TxtAnchor = TextAnchor.MiddleCenter; var column = new TableColumn("状态", "状态", columnStyle);
var column = new TableColumn("通过", "通过", columnStyle);
column.MakeCell = () => column.MakeCell = () =>
{ {
var button = new Button(); var button = new Button();
button.text = "通过"; button.text = "状态";
button.style.unityTextAlign = TextAnchor.MiddleCenter;
button.style.marginLeft = 3f; button.style.marginLeft = 3f;
button.style.unityTextAlign = columnStyle.TxtAnchor;
button.style.flexGrow = columnStyle.Stretchable ? 1f : 0f; button.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
button.style.width = columnStyle.Width; button.style.width = columnStyle.Width;
button.style.maxWidth = columnStyle.MaxWidth; button.style.maxWidth = columnStyle.MaxWidth;
button.style.minWidth = columnStyle.MinWidth; button.style.minWidth = columnStyle.MinWidth;
button.SetEnabled(false);
return button; return button;
}; };
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) => column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
@ -397,20 +344,19 @@ namespace YooAsset.Editor
// 白名单标题 // 白名单标题
{ {
var columnStyle = new ColumnStyle(); var columnStyle = new ColumnStyle();
columnStyle.Width = 70; columnStyle.Width = 80;
columnStyle.MinWidth = 70; columnStyle.MinWidth = 80;
columnStyle.MaxWidth = 70; columnStyle.MaxWidth = 80;
columnStyle.Stretchable = false; columnStyle.Stretchable = false;
columnStyle.Searchable = false; columnStyle.Searchable = false;
columnStyle.Sortable = true; columnStyle.Sortable = true;
columnStyle.TxtAnchor = TextAnchor.MiddleCenter;
var column = new TableColumn("白名单", "白名单", columnStyle); var column = new TableColumn("白名单", "白名单", columnStyle);
column.MakeCell = () => column.MakeCell = () =>
{ {
Button button = new Button(); Button button = new Button();
button.text = "白名单"; button.text = "白名单";
button.style.unityTextAlign = TextAnchor.MiddleCenter;
button.style.marginLeft = 3f; button.style.marginLeft = 3f;
button.style.unityTextAlign = columnStyle.TxtAnchor;
button.style.flexGrow = columnStyle.Stretchable ? 1f : 0f; button.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
button.style.width = columnStyle.Width; button.style.width = columnStyle.Width;
button.style.maxWidth = columnStyle.MaxWidth; button.style.maxWidth = columnStyle.MaxWidth;
@ -440,19 +386,18 @@ namespace YooAsset.Editor
columnStyle.Stretchable = false; columnStyle.Stretchable = false;
columnStyle.Searchable = false; columnStyle.Searchable = false;
columnStyle.Sortable = false; columnStyle.Sortable = false;
columnStyle.TxtAnchor = TextAnchor.MiddleCenter;
var column = new TableColumn("选中框", string.Empty, columnStyle); var column = new TableColumn("选中框", string.Empty, columnStyle);
column.MakeCell = () => column.MakeCell = () =>
{ {
var toggle = new Toggle(); var toggle = new Toggle();
toggle.text = string.Empty; toggle.text = string.Empty;
toggle.style.unityTextAlign = TextAnchor.MiddleCenter;
toggle.style.marginLeft = 3f; toggle.style.marginLeft = 3f;
toggle.style.unityTextAlign = columnStyle.TxtAnchor;
toggle.style.flexGrow = columnStyle.Stretchable ? 1f : 0f; toggle.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
toggle.style.width = columnStyle.Width; toggle.style.width = columnStyle.Width;
toggle.style.maxWidth = columnStyle.MaxWidth; toggle.style.maxWidth = columnStyle.MaxWidth;
toggle.style.minWidth = columnStyle.MinWidth; toggle.style.minWidth = columnStyle.MinWidth;
toggle.RegisterValueChangedCallback((evt) => { OnSelectToggleValueChange(toggle, evt); }); toggle.RegisterValueChangedCallback((evt) => { OnToggleValueChange(toggle, evt); });
return toggle; return toggle;
}; };
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) => column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
@ -479,8 +424,8 @@ namespace YooAsset.Editor
column.MakeCell = () => column.MakeCell = () =>
{ {
var label = new Label(); var label = new Label();
label.style.unityTextAlign = TextAnchor.MiddleLeft;
label.style.marginLeft = 3f; label.style.marginLeft = 3f;
label.style.unityTextAlign = columnStyle.TxtAnchor;
label.style.flexGrow = columnStyle.Stretchable ? 1f : 0f; label.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
label.style.width = columnStyle.Width; label.style.width = columnStyle.Width;
label.style.maxWidth = columnStyle.MaxWidth; label.style.maxWidth = columnStyle.MaxWidth;
@ -503,8 +448,7 @@ namespace YooAsset.Editor
tableData.Element = element; tableData.Element = element;
// 固定标题 // 固定标题
tableData.AddButtonCell("眼睛框"); tableData.AddCell(new PassesBtnCell("状态", element));
tableData.AddCell(new PassesBtnCell("通过", element));
tableData.AddCell(new WhiteListBtnCell("白名单", element)); tableData.AddCell(new WhiteListBtnCell("白名单", element));
tableData.AddButtonCell("选中框"); tableData.AddButtonCell("选中框");
@ -554,17 +498,12 @@ namespace YooAsset.Editor
foreach (var tableData in _sourceDatas) foreach (var tableData in _sourceDatas)
{ {
var elementTableData = tableData as ElementTableData; var elementTableData = tableData as ElementTableData;
if (_elementVisibleState == false && elementTableData.Element.Hidden) if (_showPassesElements == false && elementTableData.Element.Passes)
{ {
tableData.Visible = false; tableData.Visible = false;
continue; continue;
} }
if (_passesVisibleState == false && elementTableData.Element.Passes) if (_showWhiteElements == false && elementTableData.Element.IsWhiteList)
{
tableData.Visible = false;
continue;
}
if (_whiteListVisibleState == false && elementTableData.Element.IsWhiteList)
{ {
tableData.Visible = false; tableData.Visible = false;
continue; continue;
@ -575,7 +514,7 @@ namespace YooAsset.Editor
_elementTableView.RebuildView(); _elementTableView.RebuildView();
} }
private void OnClickTableViewItem(PointerDownEvent evt, ITableData tableData) private void OnClickListItem(PointerDownEvent evt, ITableData tableData)
{ {
// 双击后检视对应的资源 // 双击后检视对应的资源
if (evt.clickCount == 2) if (evt.clickCount == 2)
@ -594,12 +533,10 @@ namespace YooAsset.Editor
{ {
RebuildView(); RebuildView();
} }
private void OnSelectToggleValueChange(Toggle toggle, ChangeEvent<bool> e) private void OnToggleValueChange(Toggle toggle, ChangeEvent<bool> e)
{ {
// 处理自身 // 处理自身
toggle.SetValueWithoutNotify(e.newValue); toggle.SetValueWithoutNotify(e.newValue);
// 记录数据
var elementTableData = toggle.userData as ElementTableData; var elementTableData = toggle.userData as ElementTableData;
elementTableData.Element.IsSelected = e.newValue; elementTableData.Element.IsSelected = e.newValue;
@ -614,28 +551,6 @@ namespace YooAsset.Editor
// 重绘视图 // 重绘视图
RebuildView(); RebuildView();
} }
private void OnDisplayToggleValueChange(DisplayToggle toggle, ChangeEvent<bool> e)
{
toggle.RefreshIcon();
// 处理自身
toggle.SetValueWithoutNotify(e.newValue);
// 记录数据
var elementTableData = toggle.userData as ElementTableData;
elementTableData.Element.Hidden = e.newValue;
// 处理多选目标
var selectedItems = _elementTableView.selectedItems;
foreach (var selectedItem in selectedItems)
{
var selectElement = selectedItem as ElementTableData;
selectElement.Element.Hidden = e.newValue;
}
// 重绘视图
RebuildView();
}
private void OnClickWhitListButton(EventBase evt) private void OnClickWhitListButton(EventBase evt)
{ {
// 刷新点击的按钮 // 刷新点击的按钮

View File

@ -1,21 +1,18 @@
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="True"> <ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="True">
<uie:Toolbar name="Toolbar" style="display: flex; flex-direction: row;"> <uie:Toolbar name="Toolbar" style="display: flex; flex-direction: row;">
<uie:ToolbarSearchField focusable="true" name="SearchField" style="flex-grow: 1;" /> <uie:ToolbarSearchField focusable="true" name="SearchField" style="flex-grow: 1;" />
<ui:Button text="Show Passes" display-tooltip-when-elided="true" name="StateVisibleButton" style="width: 100px; background-color: rgb(56, 147, 58);" />
<ui:Button text="Show WhiteList" display-tooltip-when-elided="true" name="WhiteVisibleButton" style="width: 100px; background-color: rgb(56, 147, 58);" />
<ui:Button text="Export Select" display-tooltip-when-elided="true" name="ExportFilesButton" style="width: 100px; background-color: rgb(56, 147, 58);" />
<ui:Button text="Fix Select" display-tooltip-when-elided="true" name="FixSelectButton" style="width: 80px; background-color: rgb(56, 147, 58);" /> <ui:Button text="Fix Select" display-tooltip-when-elided="true" name="FixSelectButton" style="width: 80px; background-color: rgb(56, 147, 58);" />
<ui:Button text="Fix All" display-tooltip-when-elided="true" name="FixAllButton" style="width: 80px; background-color: rgb(56, 147, 58);" /> <ui:Button text="Fix All" display-tooltip-when-elided="true" name="FixAllButton" style="width: 80px; background-color: rgb(56, 147, 58);" />
<ui:Button text="Export Select" display-tooltip-when-elided="true" name="ExportFilesButton" style="width: 100px; background-color: rgb(56, 147, 58);" /> <ui:Button text="Import Single" display-tooltip-when-elided="true" name="SingleImportButton" style="width: 100px; background-color: rgb(56, 147, 58);" />
<ui:Button text=" Multi-Import" display-tooltip-when-elided="true" name="MultiImportButton" style="width: 100px; background-color: rgb(56, 147, 58);" /> <ui:Button text="Import Multiple " display-tooltip-when-elided="true" name="MultiImportButton" style="width: 100px; background-color: rgb(56, 147, 58);" />
<ui:Button text="Import" display-tooltip-when-elided="true" name="SingleImportButton" style="width: 100px; background-color: rgb(56, 147, 58);" />
</uie:Toolbar> </uie:Toolbar>
<ui:VisualElement name="PublicContainer" style="background-color: rgb(79, 79, 79); flex-direction: column; border-left-width: 5px; border-right-width: 5px; border-top-width: 5px; border-bottom-width: 5px;"> <ui:VisualElement name="PublicContainer" style="background-color: rgb(79, 79, 79); flex-direction: column; border-left-width: 5px; border-right-width: 5px; border-top-width: 5px; border-bottom-width: 5px;">
<ui:Label text="标题" display-tooltip-when-elided="true" name="ReportTitle" style="height: 16px; -unity-font-style: bold; -unity-text-align: middle-center;" /> <ui:Label text="标题" display-tooltip-when-elided="true" name="ReportTitle" style="height: 16px; -unity-font-style: bold; -unity-text-align: middle-center;" />
<ui:Label text="说明" display-tooltip-when-elided="true" name="ReportDesc" style="-unity-text-align: upper-left; -unity-font-style: bold; background-color: rgb(42, 42, 42); min-height: 50px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; white-space: normal;" /> <ui:Label text="说明" display-tooltip-when-elided="true" name="ReportDesc" style="-unity-text-align: upper-left; -unity-font-style: bold; background-color: rgb(42, 42, 42); min-height: 50px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; white-space: normal;" />
</ui:VisualElement> </ui:VisualElement>
<uie:Toolbar name="Toolbar" style="display: flex; flex-direction: row;">
<ui:Button text="显示隐藏元素" display-tooltip-when-elided="true" name="ShowHiddenButton" style="width: 100px;" />
<ui:Button text="显示通过元素" display-tooltip-when-elided="true" name="PassesVisibleButton" style="width: 100px;" />
<ui:Button text="显示白名单元素" display-tooltip-when-elided="true" name="WhiteListVisibleButton" style="width: 100px;" />
</uie:Toolbar>
<ui:VisualElement name="AssetGroup" style="flex-grow: 1; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px; border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); margin-left: 0; margin-right: 0; margin-top: 2px; margin-bottom: 1px; display: flex;"> <ui:VisualElement name="AssetGroup" style="flex-grow: 1; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px; border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); margin-left: 0; margin-right: 0; margin-top: 2px; margin-bottom: 1px; display: flex;">
<YooAsset.Editor.TableView name="TopTableView" /> <YooAsset.Editor.TableView name="TopTableView" />
</ui:VisualElement> </ui:VisualElement>

View File

@ -62,11 +62,6 @@ namespace YooAsset.Editor
/// 是否在白名单里 /// 是否在白名单里
/// </summary> /// </summary>
public bool IsWhiteList { set; get; } public bool IsWhiteList { set; get; }
/// <summary>
/// 是否隐藏元素
/// </summary>
public bool Hidden { set; get; }
#endregion #endregion
} }
} }

View File

@ -161,8 +161,7 @@ namespace YooAsset.Editor
} }
/// <summary> /// <summary>
/// 修复所有元素 /// 修复所有(排除白名单)
/// 注意:排除白名单和隐藏元素
/// </summary> /// </summary>
public void FixAll() public void FixAll()
{ {
@ -174,7 +173,7 @@ namespace YooAsset.Editor
List<ReportElement> fixList = new List<ReportElement>(elements.Count); List<ReportElement> fixList = new List<ReportElement>(elements.Count);
foreach (var element in elements) foreach (var element in elements)
{ {
if (element.Passes || element.IsWhiteList || element.Hidden) if (element.Passes || element.IsWhiteList)
continue; continue;
fixList.Add(element); fixList.Add(element);
} }
@ -183,8 +182,7 @@ namespace YooAsset.Editor
} }
/// <summary> /// <summary>
/// 修复选定元素 /// 修复选择项(包含白名单)
/// 注意:排除白名单和隐藏元素
/// </summary> /// </summary>
public void FixSelect() public void FixSelect()
{ {
@ -196,7 +194,7 @@ namespace YooAsset.Editor
List<ReportElement> fixList = new List<ReportElement>(elements.Count); List<ReportElement> fixList = new List<ReportElement>(elements.Count);
foreach (var element in elements) foreach (var element in elements)
{ {
if (element.Passes || element.IsWhiteList || element.Hidden) if (element.Passes)
continue; continue;
if (element.IsSelected) if (element.IsSelected)
fixList.Add(element); fixList.Add(element);

View File

@ -26,11 +26,6 @@ namespace YooAsset.Editor
/// </summary> /// </summary>
public Length MaxWidth = MaxValue; public Length MaxWidth = MaxValue;
/// <summary>
/// 文本的锚点类型
/// </summary>
public TextAnchor TxtAnchor = TextAnchor.MiddleLeft;
/// <summary> /// <summary>
/// 可伸缩 /// 可伸缩
/// </summary> /// </summary>

View File

@ -126,7 +126,7 @@ namespace YooAsset.Editor
toolbarBtn.userData = column; toolbarBtn.userData = column;
toolbarBtn.name = column.ElementName; toolbarBtn.name = column.ElementName;
toolbarBtn.text = column.HeaderTitle; toolbarBtn.text = column.HeaderTitle;
toolbarBtn.style.unityTextAlign = column.ColumnStyle.TxtAnchor; toolbarBtn.style.unityTextAlign = TextAnchor.MiddleLeft;
toolbarBtn.style.flexGrow = column.ColumnStyle.Stretchable ? 1f : 0f; toolbarBtn.style.flexGrow = column.ColumnStyle.Stretchable ? 1f : 0f;
toolbarBtn.style.width = column.ColumnStyle.Width; toolbarBtn.style.width = column.ColumnStyle.Width;
toolbarBtn.style.minWidth = column.ColumnStyle.MinWidth; toolbarBtn.style.minWidth = column.ColumnStyle.MinWidth;

View File

@ -41,36 +41,5 @@ namespace YooAsset.Editor
root.Add(spliteView); root.Add(spliteView);
} }
} }
/// <summary>
/// 显示开关(眼睛图标)
/// </summary>
public class DisplayToggle : Toggle
{
private readonly VisualElement _checkbox;
public DisplayToggle()
{
_checkbox = this.Q<VisualElement>("unity-checkmark");
RefreshIcon();
}
/// <summary>
/// 刷新图标
/// </summary>
public void RefreshIcon()
{
if (this.value)
{
var icon = EditorGUIUtility.IconContent("animationvisibilitytoggleoff@2x").image as Texture2D;
_checkbox.style.backgroundImage = icon;
}
else
{
var icon = EditorGUIUtility.IconContent("animationvisibilitytoggleon@2x").image as Texture2D;
_checkbox.style.backgroundImage = icon;
}
}
}
} }
#endif #endif

View File

@ -1,6 +1,7 @@
 
namespace YooAsset.Editor namespace YooAsset.Editor
{ {
#if UNITY_2019 #if UNITY_2019
public static partial class UnityEngine_UIElements_ListView_Extension public static partial class UnityEngine_UIElements_ListView_Extension
{ {
@ -20,4 +21,5 @@ namespace YooAsset.Editor
} }
} }
#endif #endif
} }

View File

@ -110,7 +110,7 @@ TextureImporter:
buildTarget: Android buildTarget: Android
maxTextureSize: 128 maxTextureSize: 128
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: 47 textureFormat: 48
textureCompression: 1 textureCompression: 1
compressionQuality: 50 compressionQuality: 50
crunchedCompression: 0 crunchedCompression: 0

View File

@ -20,5 +20,4 @@ MonoBehaviour:
SaveDirectory: SaveDirectory:
Collectors: Collectors:
- CollectPath: Assets/Samples/Space Shooter/GameRes/EffectArt - CollectPath: Assets/Samples/Space Shooter/GameRes/EffectArt
WhiteList: WhiteList: []
- 1c89236d45255234ebd1d39657ff7e02