mirror of https://github.com/tuyoogame/YooAsset
Compare commits
8 Commits
d72b0b10d4
...
cbb8472153
Author | SHA1 | Date |
---|---|---|
|
cbb8472153 | |
|
c85ced89ef | |
|
d5b8c90c94 | |
|
9bcfb04f91 | |
|
ae0fbd4b10 | |
|
ef4f011cf6 | |
|
7cc985205a | |
|
a38b76eb8f |
Assets/YooAsset
Editor
AssetArtReporter
AssetArtScanner
UIElements/TableView
Samples~/Space Shooter
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bdbb4647038dcc842802f546c2fedc83
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,576 @@
|
|||
#if UNITY_2019_4_OR_NEWER
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEditor.UIElements;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
public class AssetArtReporterWindow : EditorWindow
|
||||
{
|
||||
[MenuItem("YooAsset/AssetArt Reporter", false, 302)]
|
||||
public static AssetArtReporterWindow OpenWindow()
|
||||
{
|
||||
AssetArtReporterWindow window = GetWindow<AssetArtReporterWindow>("资源扫描报告", true, WindowsDefine.DockedWindowTypes);
|
||||
window.minSize = new Vector2(800, 600);
|
||||
return window;
|
||||
}
|
||||
|
||||
private class ElementTableData : DefaultTableData
|
||||
{
|
||||
public ReportElement Element;
|
||||
}
|
||||
private class PassesBtnCell : ITableCell, IComparable
|
||||
{
|
||||
public object CellValue { set; get; }
|
||||
public string SearchTag { private set; get; }
|
||||
public ReportElement Element
|
||||
{
|
||||
get
|
||||
{
|
||||
return (ReportElement)CellValue;
|
||||
}
|
||||
}
|
||||
|
||||
public PassesBtnCell(string searchTag, ReportElement element)
|
||||
{
|
||||
SearchTag = searchTag;
|
||||
CellValue = element;
|
||||
}
|
||||
public object GetDisplayObject()
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
public int CompareTo(object other)
|
||||
{
|
||||
if (other is PassesBtnCell cell)
|
||||
{
|
||||
return this.Element.Passes.CompareTo(cell.Element.Passes);
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
private class WhiteListBtnCell : ITableCell, IComparable
|
||||
{
|
||||
public object CellValue { set; get; }
|
||||
public string SearchTag { private set; get; }
|
||||
public ReportElement Element
|
||||
{
|
||||
get
|
||||
{
|
||||
return (ReportElement)CellValue;
|
||||
}
|
||||
}
|
||||
|
||||
public WhiteListBtnCell(string searchTag, ReportElement element)
|
||||
{
|
||||
SearchTag = searchTag;
|
||||
CellValue = element;
|
||||
}
|
||||
public object GetDisplayObject()
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
public int CompareTo(object other)
|
||||
{
|
||||
if (other is PassesBtnCell cell)
|
||||
{
|
||||
return this.Element.IsWhiteList.CompareTo(cell.Element.IsWhiteList);
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private ToolbarSearchField _searchField;
|
||||
private Button _whiteVisibleBtn;
|
||||
private Button _stateVisibleBtn;
|
||||
private Label _titleLabel;
|
||||
private Label _descLabel;
|
||||
private TableView _elementTableView;
|
||||
|
||||
private ScanReportCombiner _reportCombiner;
|
||||
private string _lastestOpenFolder;
|
||||
private List<ITableData> _sourceDatas;
|
||||
private bool _showWhiteElements = true;
|
||||
private bool _showPassesElements = true;
|
||||
|
||||
|
||||
public void CreateGUI()
|
||||
{
|
||||
try
|
||||
{
|
||||
VisualElement root = this.rootVisualElement;
|
||||
|
||||
// 加载布局文件
|
||||
var visualAsset = UxmlLoader.LoadWindowUXML<AssetArtReporterWindow>();
|
||||
if (visualAsset == null)
|
||||
return;
|
||||
|
||||
visualAsset.CloneTree(root);
|
||||
|
||||
// 导入按钮
|
||||
var singleImportBtn = root.Q<Button>("SingleImportButton");
|
||||
singleImportBtn.clicked += SingleImportBtn_clicked;
|
||||
var multiImportBtn = root.Q<Button>("MultiImportButton");
|
||||
multiImportBtn.clicked += MultiImportBtn_clicked;
|
||||
|
||||
// 修复按钮
|
||||
var fixAllBtn = root.Q<Button>("FixAllButton");
|
||||
fixAllBtn.clicked += FixAllBtn_clicked;
|
||||
var fixSelectBtn = root.Q<Button>("FixSelectButton");
|
||||
fixSelectBtn.clicked += FixSelectBtn_clicked;
|
||||
|
||||
// 白名单按钮
|
||||
_whiteVisibleBtn = root.Q<Button>("WhiteVisibleButton");
|
||||
_whiteVisibleBtn.clicked += WhiteVisibleBtn_clicked;
|
||||
_stateVisibleBtn = root.Q<Button>("StateVisibleButton");
|
||||
_stateVisibleBtn.clicked += StateVsibleBtn_clicked;
|
||||
|
||||
// 文件导出按钮
|
||||
var exportFilesBtn = root.Q<Button>("ExportFilesButton");
|
||||
exportFilesBtn.clicked += ExportFilesBtn_clicked;
|
||||
|
||||
// 搜索过滤
|
||||
_searchField = root.Q<ToolbarSearchField>("SearchField");
|
||||
_searchField.RegisterValueChangedCallback(OnSearchKeyWordChange);
|
||||
|
||||
// 标题和备注
|
||||
_titleLabel = root.Q<Label>("ReportTitle");
|
||||
_descLabel = root.Q<Label>("ReportDesc");
|
||||
|
||||
// 列表相关
|
||||
_elementTableView = root.Q<TableView>("TopTableView");
|
||||
_elementTableView.ClickTableDataEvent = OnClickListItem;
|
||||
|
||||
_lastestOpenFolder = EditorTools.GetProjectPath();
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
Debug.LogError(e.ToString());
|
||||
}
|
||||
}
|
||||
public void OnDestroy()
|
||||
{
|
||||
if (_reportCombiner != null)
|
||||
_reportCombiner.SaveChange();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导入单个报告文件
|
||||
/// </summary>
|
||||
public void ImportSingleReprotFile(string filePath)
|
||||
{
|
||||
// 记录本次打开目录
|
||||
_lastestOpenFolder = Path.GetDirectoryName(filePath);
|
||||
_reportCombiner = new ScanReportCombiner();
|
||||
|
||||
try
|
||||
{
|
||||
var scanReport = ScanReportConfig.ImportJsonConfig(filePath);
|
||||
_reportCombiner.Combine(scanReport);
|
||||
|
||||
// 刷新页面
|
||||
RefreshToolbar();
|
||||
FillTableView();
|
||||
RebuildView();
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
_reportCombiner = null;
|
||||
_titleLabel.text = "导入报告失败!";
|
||||
_descLabel.text = e.Message;
|
||||
UnityEngine.Debug.LogError(e.StackTrace);
|
||||
}
|
||||
}
|
||||
|
||||
private void SingleImportBtn_clicked()
|
||||
{
|
||||
string selectFilePath = EditorUtility.OpenFilePanel("导入报告", _lastestOpenFolder, "json");
|
||||
if (string.IsNullOrEmpty(selectFilePath))
|
||||
return;
|
||||
|
||||
ImportSingleReprotFile(selectFilePath);
|
||||
}
|
||||
private void MultiImportBtn_clicked()
|
||||
{
|
||||
string selectFolderPath = EditorUtility.OpenFolderPanel("导入报告", _lastestOpenFolder, null);
|
||||
if (string.IsNullOrEmpty(selectFolderPath))
|
||||
return;
|
||||
|
||||
// 记录本次打开目录
|
||||
_lastestOpenFolder = selectFolderPath;
|
||||
_reportCombiner = new ScanReportCombiner();
|
||||
|
||||
try
|
||||
{
|
||||
string[] files = Directory.GetFiles(selectFolderPath);
|
||||
foreach (string filePath in files)
|
||||
{
|
||||
string extension = System.IO.Path.GetExtension(filePath);
|
||||
if (extension == ".json")
|
||||
{
|
||||
var scanReport = ScanReportConfig.ImportJsonConfig(filePath);
|
||||
_reportCombiner.Combine(scanReport);
|
||||
}
|
||||
}
|
||||
|
||||
// 刷新页面
|
||||
RefreshToolbar();
|
||||
FillTableView();
|
||||
RebuildView();
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
_reportCombiner = null;
|
||||
_titleLabel.text = "导入报告失败!";
|
||||
_descLabel.text = e.Message;
|
||||
UnityEngine.Debug.LogError(e.StackTrace);
|
||||
}
|
||||
}
|
||||
private void FixAllBtn_clicked()
|
||||
{
|
||||
if (EditorUtility.DisplayDialog("提示", "修复全部资源(白名单除外)", "Yes", "No"))
|
||||
{
|
||||
if (_reportCombiner != null)
|
||||
_reportCombiner.FixAll();
|
||||
}
|
||||
}
|
||||
private void FixSelectBtn_clicked()
|
||||
{
|
||||
if (EditorUtility.DisplayDialog("提示", "修复所有选中资源(白名单除外)", "Yes", "No"))
|
||||
{
|
||||
if (_reportCombiner != null)
|
||||
_reportCombiner.FixSelect();
|
||||
}
|
||||
}
|
||||
private void WhiteVisibleBtn_clicked()
|
||||
{
|
||||
_showWhiteElements = !_showWhiteElements;
|
||||
RefreshToolbar();
|
||||
RebuildView();
|
||||
}
|
||||
private void StateVsibleBtn_clicked()
|
||||
{
|
||||
_showPassesElements = !_showPassesElements;
|
||||
RefreshToolbar();
|
||||
RebuildView();
|
||||
}
|
||||
private void ExportFilesBtn_clicked()
|
||||
{
|
||||
string selectFolderPath = EditorUtility.OpenFolderPanel("导入所有选中资源", EditorTools.GetProjectPath(), string.Empty);
|
||||
if (string.IsNullOrEmpty(selectFolderPath) == false)
|
||||
{
|
||||
if (_reportCombiner != null)
|
||||
_reportCombiner.ExportFiles(selectFolderPath);
|
||||
}
|
||||
}
|
||||
|
||||
private void RefreshToolbar()
|
||||
{
|
||||
if (_reportCombiner == null)
|
||||
return;
|
||||
|
||||
_titleLabel.text = _reportCombiner.ReportTitle;
|
||||
_descLabel.text = _reportCombiner.ReportDesc;
|
||||
|
||||
if (_showWhiteElements)
|
||||
_whiteVisibleBtn.style.backgroundColor = new StyleColor(new Color32(56, 147, 58, 255));
|
||||
else
|
||||
_whiteVisibleBtn.style.backgroundColor = new StyleColor(new Color32(100, 100, 100, 255));
|
||||
|
||||
if (_showPassesElements)
|
||||
_stateVisibleBtn.style.backgroundColor = new StyleColor(new Color32(56, 147, 58, 255));
|
||||
else
|
||||
_stateVisibleBtn.style.backgroundColor = new StyleColor(new Color32(100, 100, 100, 255));
|
||||
}
|
||||
private void FillTableView()
|
||||
{
|
||||
if (_reportCombiner == null)
|
||||
return;
|
||||
|
||||
_elementTableView.ClearAll(true, true);
|
||||
|
||||
// 状态标题
|
||||
{
|
||||
var columnStyle = new ColumnStyle();
|
||||
columnStyle.Width = 80;
|
||||
columnStyle.MinWidth = 80;
|
||||
columnStyle.MaxWidth = 80;
|
||||
columnStyle.Stretchable = false;
|
||||
columnStyle.Searchable = false;
|
||||
columnStyle.Sortable = true;
|
||||
var column = new TableColumn("状态", "状态", columnStyle);
|
||||
|
||||
column.MakeCell = () =>
|
||||
{
|
||||
var button = new Button();
|
||||
button.text = "状态";
|
||||
button.style.unityTextAlign = TextAnchor.MiddleCenter;
|
||||
button.style.marginLeft = 3f;
|
||||
button.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
|
||||
button.style.width = columnStyle.Width;
|
||||
button.style.maxWidth = columnStyle.MaxWidth;
|
||||
button.style.minWidth = columnStyle.MinWidth;
|
||||
return button;
|
||||
};
|
||||
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||
{
|
||||
Button button = element as Button;
|
||||
var elementTableData = data as ElementTableData;
|
||||
if (elementTableData.Element.Passes)
|
||||
{
|
||||
button.style.backgroundColor = new StyleColor(new Color32(56, 147, 58, 255));
|
||||
button.text = "通过";
|
||||
}
|
||||
else
|
||||
{
|
||||
button.style.backgroundColor = new StyleColor(new Color32(137, 0, 0, 255));
|
||||
button.text = "失败";
|
||||
}
|
||||
};
|
||||
_elementTableView.AddColumn(column);
|
||||
}
|
||||
|
||||
// 白名单标题
|
||||
{
|
||||
var columnStyle = new ColumnStyle();
|
||||
columnStyle.Width = 80;
|
||||
columnStyle.MinWidth = 80;
|
||||
columnStyle.MaxWidth = 80;
|
||||
columnStyle.Stretchable = false;
|
||||
columnStyle.Searchable = false;
|
||||
columnStyle.Sortable = true;
|
||||
var column = new TableColumn("白名单", "白名单", columnStyle);
|
||||
column.MakeCell = () =>
|
||||
{
|
||||
Button button = new Button();
|
||||
button.text = "白名单";
|
||||
button.style.unityTextAlign = TextAnchor.MiddleCenter;
|
||||
button.style.marginLeft = 3f;
|
||||
button.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
|
||||
button.style.width = columnStyle.Width;
|
||||
button.style.maxWidth = columnStyle.MaxWidth;
|
||||
button.style.minWidth = columnStyle.MinWidth;
|
||||
button.clickable.clickedWithEventInfo += OnClickWhitListButton;
|
||||
return button;
|
||||
};
|
||||
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||
{
|
||||
Button button = element as Button;
|
||||
button.userData = data;
|
||||
var elementTableData = data as ElementTableData;
|
||||
if (elementTableData.Element.IsWhiteList)
|
||||
button.style.backgroundColor = new StyleColor(new Color32(56, 147, 58, 255));
|
||||
else
|
||||
button.style.backgroundColor = new StyleColor(new Color32(100, 100, 100, 255));
|
||||
};
|
||||
_elementTableView.AddColumn(column);
|
||||
}
|
||||
|
||||
// 选中标题
|
||||
{
|
||||
var columnStyle = new ColumnStyle();
|
||||
columnStyle.Width = 20;
|
||||
columnStyle.MinWidth = 20;
|
||||
columnStyle.MaxWidth = 20;
|
||||
columnStyle.Stretchable = false;
|
||||
columnStyle.Searchable = false;
|
||||
columnStyle.Sortable = false;
|
||||
var column = new TableColumn("选中框", string.Empty, columnStyle);
|
||||
column.MakeCell = () =>
|
||||
{
|
||||
var toggle = new Toggle();
|
||||
toggle.text = string.Empty;
|
||||
toggle.style.unityTextAlign = TextAnchor.MiddleCenter;
|
||||
toggle.style.marginLeft = 3f;
|
||||
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) => { OnToggleValueChange(toggle, evt); });
|
||||
return toggle;
|
||||
};
|
||||
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||
{
|
||||
var toggle = element as Toggle;
|
||||
toggle.userData = data;
|
||||
var tableData = data as ElementTableData;
|
||||
toggle.SetValueWithoutNotify(tableData.Element.IsSelected);
|
||||
};
|
||||
_elementTableView.AddColumn(column);
|
||||
}
|
||||
|
||||
// 自定义标题栏
|
||||
foreach (var header in _reportCombiner.Headers)
|
||||
{
|
||||
var columnStyle = new ColumnStyle();
|
||||
columnStyle.Width = header.Width;
|
||||
columnStyle.MinWidth = header.MinWidth;
|
||||
columnStyle.MaxWidth = header.MaxWidth;
|
||||
columnStyle.Stretchable = header.Stretchable;
|
||||
columnStyle.Searchable = header.Searchable;
|
||||
columnStyle.Sortable = header.Sortable;
|
||||
var column = new TableColumn(header.HeaderTitle, header.HeaderTitle, columnStyle);
|
||||
column.MakeCell = () =>
|
||||
{
|
||||
var label = new Label();
|
||||
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||
label.style.marginLeft = 3f;
|
||||
label.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
|
||||
label.style.width = columnStyle.Width;
|
||||
label.style.maxWidth = columnStyle.MaxWidth;
|
||||
label.style.minWidth = columnStyle.MinWidth;
|
||||
return label;
|
||||
};
|
||||
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||
{
|
||||
var infoLabel = element as Label;
|
||||
infoLabel.text = (string)cell.GetDisplayObject();
|
||||
};
|
||||
_elementTableView.AddColumn(column);
|
||||
}
|
||||
|
||||
// 填充数据源
|
||||
_sourceDatas = new List<ITableData>(_reportCombiner.Elements.Count);
|
||||
foreach (var element in _reportCombiner.Elements)
|
||||
{
|
||||
var tableData = new ElementTableData();
|
||||
tableData.Element = element;
|
||||
|
||||
// 固定标题
|
||||
tableData.AddCell(new PassesBtnCell("状态", element));
|
||||
tableData.AddCell(new WhiteListBtnCell("白名单", element));
|
||||
tableData.AddButtonCell("选中框");
|
||||
|
||||
// 自定义标题
|
||||
foreach (var scanInfo in element.ScanInfos)
|
||||
{
|
||||
var header = _reportCombiner.GetHeader(scanInfo.HeaderTitle);
|
||||
if (header.HeaderType == EHeaderType.AssetPath)
|
||||
{
|
||||
tableData.AddAssetPathCell(scanInfo.HeaderTitle, scanInfo.ScanInfo);
|
||||
}
|
||||
else if (header.HeaderType == EHeaderType.StringValue)
|
||||
{
|
||||
tableData.AddStringValueCell(scanInfo.HeaderTitle, scanInfo.ScanInfo);
|
||||
}
|
||||
else if (header.HeaderType == EHeaderType.LongValue)
|
||||
{
|
||||
long value = Convert.ToInt64(scanInfo.ScanInfo);
|
||||
tableData.AddLongValueCell(scanInfo.HeaderTitle, value);
|
||||
}
|
||||
else if (header.HeaderType == EHeaderType.DoubleValue)
|
||||
{
|
||||
double value = Convert.ToDouble(scanInfo.ScanInfo);
|
||||
tableData.AddDoubleValueCell(scanInfo.HeaderTitle, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new NotImplementedException(header.HeaderType.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
_sourceDatas.Add(tableData);
|
||||
}
|
||||
_elementTableView.itemsSource = _sourceDatas;
|
||||
}
|
||||
private void RebuildView()
|
||||
{
|
||||
if (_reportCombiner == null)
|
||||
return;
|
||||
|
||||
string searchKeyword = _searchField.value;
|
||||
|
||||
// 搜索匹配
|
||||
DefaultSearchSystem.Search(_sourceDatas, searchKeyword);
|
||||
|
||||
// 开关匹配
|
||||
foreach (var tableData in _sourceDatas)
|
||||
{
|
||||
var elementTableData = tableData as ElementTableData;
|
||||
if (_showPassesElements == false && elementTableData.Element.Passes)
|
||||
{
|
||||
tableData.Visible = false;
|
||||
continue;
|
||||
}
|
||||
if (_showWhiteElements == false && elementTableData.Element.IsWhiteList)
|
||||
{
|
||||
tableData.Visible = false;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 重建视图
|
||||
_elementTableView.RebuildView();
|
||||
}
|
||||
|
||||
private void OnClickListItem(PointerDownEvent evt, ITableData tableData)
|
||||
{
|
||||
// 双击后检视对应的资源
|
||||
if (evt.clickCount == 2)
|
||||
{
|
||||
foreach (var cell in tableData.Cells)
|
||||
{
|
||||
if (cell is AssetPathCell assetPathCell)
|
||||
{
|
||||
if (assetPathCell.PingAssetObject())
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private void OnSearchKeyWordChange(ChangeEvent<string> e)
|
||||
{
|
||||
RebuildView();
|
||||
}
|
||||
private void OnToggleValueChange(Toggle toggle, ChangeEvent<bool> e)
|
||||
{
|
||||
// 处理自身
|
||||
toggle.SetValueWithoutNotify(e.newValue);
|
||||
var elementTableData = toggle.userData as ElementTableData;
|
||||
elementTableData.Element.IsSelected = e.newValue;
|
||||
|
||||
// 处理多选目标
|
||||
var selectedItems = _elementTableView.selectedItems;
|
||||
foreach (var selectedItem in selectedItems)
|
||||
{
|
||||
var selectElement = selectedItem as ElementTableData;
|
||||
selectElement.Element.IsSelected = e.newValue;
|
||||
}
|
||||
|
||||
// 重绘视图
|
||||
RebuildView();
|
||||
}
|
||||
private void OnClickWhitListButton(EventBase evt)
|
||||
{
|
||||
// 刷新点击的按钮
|
||||
Button button = evt.target as Button;
|
||||
var elementTableData = button.userData as ElementTableData;
|
||||
elementTableData.Element.IsWhiteList = !elementTableData.Element.IsWhiteList;
|
||||
|
||||
// 刷新框选的按钮
|
||||
var selectedItems = _elementTableView.selectedItems;
|
||||
if (selectedItems.Count() > 1)
|
||||
{
|
||||
foreach (var selectedItem in selectedItems)
|
||||
{
|
||||
var selectElement = selectedItem as ElementTableData;
|
||||
selectElement.Element.IsWhiteList = selectElement.Element.IsWhiteList;
|
||||
}
|
||||
}
|
||||
|
||||
RebuildView();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4048f85b9ff1f424a89a9d6109e6faaf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,19 @@
|
|||
<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:ToolbarSearchField focusable="true" name="SearchField" style="flex-grow: 1;" />
|
||||
<ui:Button text="显示通过元素" display-tooltip-when-elided="true" name="StateVisibleButton" style="width: 100px; background-color: rgb(56, 147, 58);" />
|
||||
<ui:Button text="显示白名单元素" display-tooltip-when-elided="true" name="WhiteVisibleButton" style="width: 100px; background-color: rgb(56, 147, 58);" />
|
||||
<ui:Button text="导出选中文件" display-tooltip-when-elided="true" name="ExportFilesButton" style="width: 80px; background-color: rgb(56, 147, 58);" />
|
||||
<ui:Button text="修复选中" display-tooltip-when-elided="true" name="FixSelectButton" style="width: 60px; background-color: rgb(56, 147, 58);" />
|
||||
<ui:Button text="修复所有" display-tooltip-when-elided="true" name="FixAllButton" style="width: 60px; background-color: rgb(56, 147, 58);" />
|
||||
<ui:Button text="单个导入" display-tooltip-when-elided="true" name="SingleImportButton" style="width: 60px; background-color: rgb(56, 147, 58);" />
|
||||
<ui:Button text="合并导入" display-tooltip-when-elided="true" name="MultiImportButton" style="width: 60px; background-color: rgb(56, 147, 58);" />
|
||||
</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: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:VisualElement>
|
||||
<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" />
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b87fc70b750616849942173af3bdfd90
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
public enum EHeaderType
|
||||
{
|
||||
AssetPath,
|
||||
StringValue,
|
||||
LongValue,
|
||||
DoubleValue,
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 97cd7d0d616708e42bc53ed7d88718c9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,67 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
[Serializable]
|
||||
public class ReportElement
|
||||
{
|
||||
/// <summary>
|
||||
/// GUID(白名单存储对象)
|
||||
/// </summary>
|
||||
public string GUID;
|
||||
|
||||
/// <summary>
|
||||
/// 扫描是否通过
|
||||
/// </summary>
|
||||
public bool Passes = true;
|
||||
|
||||
/// <summary>
|
||||
/// 反馈的信息列表
|
||||
/// </summary>
|
||||
public List<ReportScanInfo> ScanInfos = new List<ReportScanInfo>();
|
||||
|
||||
|
||||
public ReportElement(string guid)
|
||||
{
|
||||
GUID = guid;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加扫描信息
|
||||
/// </summary>
|
||||
public void AddScanInfo(string headerTitle, string scanInfo)
|
||||
{
|
||||
var reportScanInfo = new ReportScanInfo(headerTitle, scanInfo);
|
||||
ScanInfos.Add(reportScanInfo);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取扫描信息
|
||||
/// </summary>
|
||||
public ReportScanInfo GetScanInfo(string headerTitle)
|
||||
{
|
||||
foreach (var scanInfo in ScanInfos)
|
||||
{
|
||||
if (scanInfo.HeaderTitle == headerTitle)
|
||||
return scanInfo;
|
||||
}
|
||||
|
||||
UnityEngine.Debug.LogWarning($"Not found {nameof(ReportScanInfo)} : {headerTitle}");
|
||||
return null;
|
||||
}
|
||||
|
||||
#region 临时字段
|
||||
/// <summary>
|
||||
/// 是否在列表里选中
|
||||
/// </summary>
|
||||
public bool IsSelected { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否在白名单里
|
||||
/// </summary>
|
||||
public bool IsWhiteList { set; get; }
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d61f7ee1a8215bf438071055f0a9cb09
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,87 @@
|
|||
using System;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
[Serializable]
|
||||
public class ReportHeader
|
||||
{
|
||||
public const int MaxValue = 8388608;
|
||||
|
||||
/// <summary>
|
||||
/// 标题
|
||||
/// </summary>
|
||||
public string HeaderTitle;
|
||||
|
||||
/// <summary>
|
||||
/// 标题宽度
|
||||
/// </summary>
|
||||
public int Width;
|
||||
|
||||
/// <summary>
|
||||
/// 单元列最小宽度
|
||||
/// </summary>
|
||||
public int MinWidth = 30;
|
||||
|
||||
/// <summary>
|
||||
/// 单元列最大宽度
|
||||
/// </summary>
|
||||
public int MaxWidth = MaxValue;
|
||||
|
||||
/// <summary>
|
||||
/// 可伸缩选项
|
||||
/// </summary>
|
||||
public bool Stretchable = false;
|
||||
|
||||
/// <summary>
|
||||
/// 可搜索选项
|
||||
/// </summary>
|
||||
public bool Searchable = false;
|
||||
|
||||
/// <summary>
|
||||
/// 可排序选项
|
||||
/// </summary>
|
||||
public bool Sortable = false;
|
||||
|
||||
/// <summary>
|
||||
/// 数值类型
|
||||
/// </summary>
|
||||
public EHeaderType HeaderType = EHeaderType.StringValue;
|
||||
|
||||
|
||||
public ReportHeader(string headerTitle, int width)
|
||||
{
|
||||
HeaderTitle = headerTitle;
|
||||
Width = width;
|
||||
}
|
||||
public ReportHeader SetMinWidth(int value)
|
||||
{
|
||||
MinWidth = value;
|
||||
return this;
|
||||
}
|
||||
public ReportHeader SetMaxWidth(int value)
|
||||
{
|
||||
MaxWidth = value;
|
||||
return this;
|
||||
}
|
||||
public ReportHeader SetStretchable()
|
||||
{
|
||||
Stretchable = true;
|
||||
return this;
|
||||
}
|
||||
public ReportHeader SetSearchable()
|
||||
{
|
||||
Searchable = true;
|
||||
return this;
|
||||
}
|
||||
public ReportHeader SetSortable()
|
||||
{
|
||||
Sortable = true;
|
||||
return this;
|
||||
}
|
||||
public ReportHeader SetHeaderType(EHeaderType value)
|
||||
{
|
||||
HeaderType = value;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3be8b45a77bb720478379c26da3aa68a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
[Serializable]
|
||||
public class ReportScanInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 标题
|
||||
/// </summary>
|
||||
public string HeaderTitle;
|
||||
|
||||
/// <summary>
|
||||
/// 扫描反馈的信息
|
||||
/// </summary>
|
||||
public string ScanInfo;
|
||||
|
||||
public ReportScanInfo(string headerTitle, string scanInfo)
|
||||
{
|
||||
HeaderTitle = headerTitle;
|
||||
ScanInfo = scanInfo;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 02caa7ae84ee8294a8904a5aaed420ee
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,65 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
[Serializable]
|
||||
public class ScanReport
|
||||
{
|
||||
/// <summary>
|
||||
/// 文件签名(自动填写)
|
||||
/// </summary>
|
||||
public string FileSign;
|
||||
|
||||
/// <summary>
|
||||
/// 文件版本(自动填写)
|
||||
/// </summary>
|
||||
public string FileVersion;
|
||||
|
||||
/// <summary>
|
||||
/// 模式类型(自动填写)
|
||||
/// </summary>
|
||||
public string SchemaType;
|
||||
|
||||
/// <summary>
|
||||
/// 扫描器GUID(自动填写)
|
||||
/// </summary>
|
||||
public string ScannerGUID;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 报告标题
|
||||
/// </summary>
|
||||
public string ReportTitle;
|
||||
|
||||
/// <summary>
|
||||
/// 报告介绍
|
||||
/// </summary>
|
||||
public string ReportDesc;
|
||||
|
||||
/// <summary>
|
||||
/// 报告的标题列表
|
||||
/// </summary>
|
||||
public List<ReportHeader> HeaderTitles = new List<ReportHeader>();
|
||||
|
||||
/// <summary>
|
||||
/// 扫描的元素列表
|
||||
/// </summary>
|
||||
public List<ReportElement> ReportElements = new List<ReportElement>();
|
||||
|
||||
|
||||
public ScanReport(string reportTitle, string reportDesc)
|
||||
{
|
||||
ReportTitle = reportTitle;
|
||||
ReportDesc = reportDesc;
|
||||
}
|
||||
|
||||
public ReportHeader AddHeader(string headerTitle, int width)
|
||||
{
|
||||
var reportHeader = new ReportHeader(headerTitle, width);
|
||||
HeaderTitles.Add(reportHeader);
|
||||
return reportHeader;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 650e3e4af4ede2a4eb2471c30e7820bb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,219 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
/// <summary>
|
||||
/// 资源扫描报告合并器
|
||||
/// 说明:相同类型的报告可以合并查看
|
||||
/// </summary>
|
||||
public class ScanReportCombiner
|
||||
{
|
||||
/// <summary>
|
||||
/// 模式类型
|
||||
/// </summary>
|
||||
public string SchemaType { private set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 报告标题
|
||||
/// </summary>
|
||||
public string ReportTitle { private set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 报告介绍
|
||||
/// </summary>
|
||||
public string ReportDesc { private set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 标题列表
|
||||
/// </summary>
|
||||
public List<ReportHeader> Headers = new List<ReportHeader>();
|
||||
|
||||
/// <summary>
|
||||
/// 扫描结果
|
||||
/// </summary>
|
||||
public readonly List<ReportElement> Elements = new List<ReportElement>(10000);
|
||||
private readonly Dictionary<string, ScanReport> _combines = new Dictionary<string, ScanReport>(100);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 合并报告文件
|
||||
/// 注意:模式不同的报告文件会合并失败!
|
||||
/// </summary>
|
||||
public bool Combine(ScanReport scanReport)
|
||||
{
|
||||
if (string.IsNullOrEmpty(scanReport.SchemaType))
|
||||
{
|
||||
Debug.LogError("Scan report schema type is null or empty !");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(SchemaType))
|
||||
{
|
||||
SchemaType = scanReport.SchemaType;
|
||||
ReportTitle = scanReport.ReportTitle;
|
||||
ReportDesc = scanReport.ReportDesc;
|
||||
Headers = scanReport.HeaderTitles;
|
||||
}
|
||||
|
||||
if (SchemaType != scanReport.SchemaType)
|
||||
{
|
||||
Debug.LogWarning($"Scan report has different schema type!{scanReport.SchemaType} != {SchemaType}");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_combines.ContainsKey(scanReport.ScannerGUID))
|
||||
{
|
||||
Debug.LogWarning($"Scan report has already existed : {scanReport.ScannerGUID}");
|
||||
return false;
|
||||
}
|
||||
|
||||
_combines.Add(scanReport.ScannerGUID, scanReport);
|
||||
CombineInternal(scanReport);
|
||||
return true;
|
||||
}
|
||||
private void CombineInternal(ScanReport scanReport)
|
||||
{
|
||||
string scannerGUID = scanReport.ScannerGUID;
|
||||
List<ReportElement> elements = scanReport.ReportElements;
|
||||
|
||||
// 设置白名单
|
||||
var scanner = AssetArtScannerSettingData.GetScannerByGUID(scannerGUID);
|
||||
if (scanner != null)
|
||||
{
|
||||
foreach (var element in elements)
|
||||
{
|
||||
if (scanner.CheckWhiteList(element.GUID))
|
||||
element.IsWhiteList = true;
|
||||
}
|
||||
}
|
||||
|
||||
// 添加到集合
|
||||
Elements.AddRange(elements);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取指定的标题类
|
||||
/// </summary>
|
||||
public ReportHeader GetHeader(string headerTitle)
|
||||
{
|
||||
foreach (var header in Headers)
|
||||
{
|
||||
if (header.HeaderTitle == headerTitle)
|
||||
return header;
|
||||
}
|
||||
|
||||
UnityEngine.Debug.LogWarning($"Not found {nameof(ReportHeader)} : {headerTitle}");
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导出选中文件
|
||||
/// </summary>
|
||||
public void ExportFiles(string exportFolderPath)
|
||||
{
|
||||
if (string.IsNullOrEmpty(exportFolderPath))
|
||||
return;
|
||||
|
||||
foreach (var element in Elements)
|
||||
{
|
||||
if (element.IsSelected)
|
||||
{
|
||||
string assetPath = AssetDatabase.GUIDToAssetPath(element.GUID);
|
||||
if (string.IsNullOrEmpty(assetPath) == false)
|
||||
{
|
||||
string destPath = Path.Combine(exportFolderPath, assetPath);
|
||||
EditorTools.CopyFile(assetPath, destPath, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存改变数据
|
||||
/// </summary>
|
||||
public void SaveChange()
|
||||
{
|
||||
// 存储白名单
|
||||
foreach (var scanReport in _combines.Values)
|
||||
{
|
||||
string scannerGUID = scanReport.ScannerGUID;
|
||||
var elements = scanReport.ReportElements;
|
||||
|
||||
var scanner = AssetArtScannerSettingData.GetScannerByGUID(scannerGUID);
|
||||
if (scanner != null)
|
||||
{
|
||||
List<string> whiteList = new List<string>(elements.Count);
|
||||
foreach (var element in elements)
|
||||
{
|
||||
if (element.IsWhiteList)
|
||||
whiteList.Add(element.GUID);
|
||||
}
|
||||
whiteList.Sort();
|
||||
scanner.WhiteList = whiteList;
|
||||
AssetArtScannerSettingData.SaveFile();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修复所有(排除白名单)
|
||||
/// </summary>
|
||||
public void FixAll()
|
||||
{
|
||||
foreach (var scanReport in _combines.Values)
|
||||
{
|
||||
string scannerGUID = scanReport.ScannerGUID;
|
||||
var elements = scanReport.ReportElements;
|
||||
|
||||
List<ReportElement> fixList = new List<ReportElement>(elements.Count);
|
||||
foreach (var element in elements)
|
||||
{
|
||||
if (element.Passes || element.IsWhiteList)
|
||||
continue;
|
||||
fixList.Add(element);
|
||||
}
|
||||
FixInternal(scannerGUID, fixList);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修复选择项(包含白名单)
|
||||
/// </summary>
|
||||
public void FixSelect()
|
||||
{
|
||||
foreach (var scanReport in _combines.Values)
|
||||
{
|
||||
string scannerGUID = scanReport.ScannerGUID;
|
||||
var elements = scanReport.ReportElements;
|
||||
|
||||
List<ReportElement> fixList = new List<ReportElement>(elements.Count);
|
||||
foreach (var element in elements)
|
||||
{
|
||||
if (element.Passes)
|
||||
continue;
|
||||
if (element.IsSelected)
|
||||
fixList.Add(element);
|
||||
}
|
||||
FixInternal(scannerGUID, fixList);
|
||||
}
|
||||
}
|
||||
|
||||
private void FixInternal(string scannerGUID, List<ReportElement> fixList)
|
||||
{
|
||||
AssetArtScanner scanner = AssetArtScannerSettingData.GetScannerByGUID(scannerGUID);
|
||||
if (scanner != null)
|
||||
{
|
||||
var schema = scanner.LoadSchema();
|
||||
if (schema != null)
|
||||
{
|
||||
schema.FixResult(fixList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8524c3deb9b27fe4e8e63f15b9ffaaa3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,54 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
public class ScanReportConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 导入JSON报告文件
|
||||
/// </summary>
|
||||
public static ScanReport ImportJsonConfig(string filePath)
|
||||
{
|
||||
if (File.Exists(filePath) == false)
|
||||
throw new FileNotFoundException(filePath);
|
||||
|
||||
string jsonData = FileUtility.ReadAllText(filePath);
|
||||
ScanReport report = JsonUtility.FromJson<ScanReport>(jsonData);
|
||||
|
||||
// 检测配置文件的签名
|
||||
if (report.FileSign != ScannerDefine.ReportFileSign)
|
||||
throw new Exception($"导入的报告文件无法识别 : {filePath}");
|
||||
|
||||
// 检测报告文件的版本
|
||||
if (report.FileVersion != ScannerDefine.ReportFileVersion)
|
||||
throw new Exception($"报告文件的版本不匹配 : {report.FileVersion} != {ScannerDefine.ReportFileVersion}");
|
||||
|
||||
// 检测标题数和内容是否匹配
|
||||
foreach (var element in report.ReportElements)
|
||||
{
|
||||
if (element.ScanInfos.Count != report.HeaderTitles.Count)
|
||||
{
|
||||
throw new Exception($"报告的标题数和内容不匹配!");
|
||||
}
|
||||
}
|
||||
|
||||
return report;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导出JSON报告文件
|
||||
/// </summary>
|
||||
public static void ExportJsonConfig(string savePath, ScanReport scanReport)
|
||||
{
|
||||
if (File.Exists(savePath))
|
||||
File.Delete(savePath);
|
||||
|
||||
string json = JsonUtility.ToJson(scanReport, true);
|
||||
FileUtility.WriteAllText(savePath, json);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 694cf47ade54f2b4fa6e618c1310c476
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9bc1ecc3b72dfc34782fb6926d679f92
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
[Serializable]
|
||||
public class AssetArtCollector
|
||||
{
|
||||
/// <summary>
|
||||
/// 扫描目录
|
||||
/// </summary>
|
||||
public string CollectPath = string.Empty;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6e7252b59455e5c45af0041ccd24b234
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,113 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
[Serializable]
|
||||
public class AssetArtScanner
|
||||
{
|
||||
/// <summary>
|
||||
/// 扫描器GUID
|
||||
/// </summary>
|
||||
public string ScannerGUID = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 扫描器名称
|
||||
/// </summary>
|
||||
public string ScannerName = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 扫描器描述
|
||||
/// </summary>
|
||||
public string ScannerDesc = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 扫描模式
|
||||
/// 注意:文件路径或文件GUID
|
||||
/// </summary>
|
||||
public string ScannerSchema = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 存储目录
|
||||
/// </summary>
|
||||
public string SaveDirectory = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 收集列表
|
||||
/// </summary>
|
||||
public List<AssetArtCollector> Collectors = new List<AssetArtCollector>();
|
||||
|
||||
/// <summary>
|
||||
/// 白名单
|
||||
/// </summary>
|
||||
public List<string> WhiteList = new List<string>();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否在白名单里
|
||||
/// </summary>
|
||||
public bool CheckWhiteList(string guid)
|
||||
{
|
||||
return WhiteList.Contains(guid);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载扫描模式实例
|
||||
/// </summary>
|
||||
public ScannerSchema LoadSchema()
|
||||
{
|
||||
if (string.IsNullOrEmpty(ScannerSchema))
|
||||
return null;
|
||||
|
||||
string filePath;
|
||||
if (ScannerSchema.StartsWith("Assets/"))
|
||||
{
|
||||
filePath = ScannerSchema;
|
||||
}
|
||||
else
|
||||
{
|
||||
string guid = ScannerSchema;
|
||||
filePath = AssetDatabase.GUIDToAssetPath(guid);
|
||||
}
|
||||
|
||||
var schema = AssetDatabase.LoadMainAssetAtPath(filePath) as ScannerSchema;
|
||||
if (schema == null)
|
||||
Debug.LogWarning($"Failed load scanner schema : {filePath}");
|
||||
return schema;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 运行扫描器生成报告类
|
||||
/// </summary>
|
||||
public ScanReport RunScanner()
|
||||
{
|
||||
if (Collectors.Count == 0)
|
||||
{
|
||||
Debug.LogWarning($"Scanner collector is empty : {ScannerName}");
|
||||
return null;
|
||||
}
|
||||
|
||||
ScannerSchema schema = LoadSchema();
|
||||
if (schema == null)
|
||||
return null;
|
||||
|
||||
var report = schema.RunScanner(this);
|
||||
report.FileSign = ScannerDefine.ReportFileSign;
|
||||
report.FileVersion = ScannerDefine.ReportFileVersion;
|
||||
report.SchemaType = schema.GetType().FullName;
|
||||
report.ScannerGUID = ScannerGUID;
|
||||
return report;
|
||||
}
|
||||
|
||||
public bool CheckKeyword(string keyword)
|
||||
{
|
||||
if (ScannerName.Contains(keyword) || ScannerDesc.Contains(keyword))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c63683b07b7a2454b93539ae6b9f32ea
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,85 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
public class AssetArtScannerConfig
|
||||
{
|
||||
public class ConfigWrapper
|
||||
{
|
||||
/// <summary>
|
||||
/// 文件签名
|
||||
/// </summary>
|
||||
public string FileSign;
|
||||
|
||||
/// <summary>
|
||||
/// 文件版本
|
||||
/// </summary>
|
||||
public string FileVersion;
|
||||
|
||||
/// <summary>
|
||||
/// 扫描器列表
|
||||
/// </summary>
|
||||
public List<AssetArtScanner> Scanners = new List<AssetArtScanner>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导入JSON配置文件
|
||||
/// </summary>
|
||||
public static void ImportJsonConfig(string filePath)
|
||||
{
|
||||
if (File.Exists(filePath) == false)
|
||||
throw new FileNotFoundException(filePath);
|
||||
|
||||
string json = FileUtility.ReadAllText(filePath);
|
||||
ConfigWrapper setting = JsonUtility.FromJson<ConfigWrapper>(json);
|
||||
|
||||
// 检测配置文件的签名
|
||||
if (setting.FileSign != ScannerDefine.SettingFileSign)
|
||||
throw new Exception($"导入的配置文件无法识别 : {filePath}");
|
||||
|
||||
// 检测配置文件的版本
|
||||
if (setting.FileVersion != ScannerDefine.SettingFileVersion)
|
||||
throw new Exception($"配置文件的版本不匹配 : {setting.FileVersion} != {ScannerDefine.SettingFileVersion}");
|
||||
|
||||
// 检测配置合法性
|
||||
HashSet<string> scanGUIDs = new HashSet<string>();
|
||||
foreach (var sacnner in setting.Scanners)
|
||||
{
|
||||
if (scanGUIDs.Contains(sacnner.ScannerGUID))
|
||||
{
|
||||
throw new Exception($"Scanner {sacnner.ScannerName} GUID is existed : {sacnner.ScannerGUID} ");
|
||||
}
|
||||
else
|
||||
{
|
||||
scanGUIDs.Add(sacnner.ScannerGUID);
|
||||
}
|
||||
}
|
||||
|
||||
AssetArtScannerSettingData.Setting.Scanners = setting.Scanners;
|
||||
AssetArtScannerSettingData.SaveFile();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导出JSON配置文件
|
||||
/// </summary>
|
||||
public static void ExportJsonConfig(string savePath)
|
||||
{
|
||||
if (File.Exists(savePath))
|
||||
File.Delete(savePath);
|
||||
|
||||
ConfigWrapper wrapper = new ConfigWrapper();
|
||||
wrapper.FileSign = ScannerDefine.SettingFileSign;
|
||||
wrapper.FileVersion = ScannerDefine.SettingFileVersion;
|
||||
wrapper.Scanners = AssetArtScannerSettingData.Setting.Scanners;
|
||||
|
||||
string json = JsonUtility.ToJson(wrapper, true);
|
||||
FileUtility.WriteAllText(savePath, json);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bed1ef72d1c03e848a41d5ea115e9870
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,17 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
public class AssetArtScannerSetting : ScriptableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 扫描器列表
|
||||
/// </summary>
|
||||
public List<AssetArtScanner> Scanners = new List<AssetArtScanner>();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 84df5e62e3f1b6746a1263e076b003e1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,203 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
public class AssetArtScannerSettingData
|
||||
{
|
||||
/// <summary>
|
||||
/// 配置数据是否被修改
|
||||
/// </summary>
|
||||
public static bool IsDirty { private set; get; } = false;
|
||||
|
||||
|
||||
static AssetArtScannerSettingData()
|
||||
{
|
||||
}
|
||||
|
||||
private static AssetArtScannerSetting _setting = null;
|
||||
public static AssetArtScannerSetting Setting
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_setting == null)
|
||||
_setting = SettingLoader.LoadSettingData<AssetArtScannerSetting>();
|
||||
return _setting;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 存储配置文件
|
||||
/// </summary>
|
||||
public static void SaveFile()
|
||||
{
|
||||
if (Setting != null)
|
||||
{
|
||||
IsDirty = false;
|
||||
EditorUtility.SetDirty(Setting);
|
||||
AssetDatabase.SaveAssets();
|
||||
Debug.Log($"{nameof(AssetArtScannerSetting)}.asset is saved!");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 清空所有数据
|
||||
/// </summary>
|
||||
public static void ClearAll()
|
||||
{
|
||||
Setting.Scanners.Clear();
|
||||
SaveFile();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 扫描所有项
|
||||
/// </summary>
|
||||
public static void ScanAll()
|
||||
{
|
||||
foreach (var scanner in Setting.Scanners)
|
||||
{
|
||||
var scanResult = ScanInternal(scanner);
|
||||
if (scanResult.Succeed == false)
|
||||
{
|
||||
Debug.LogError($"Scanner {scanner.ScannerName} failed ! {scanResult.ErrorInfo}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 扫描所有项
|
||||
/// </summary>
|
||||
public static void ScanAll(string keyword)
|
||||
{
|
||||
foreach (var scanner in Setting.Scanners)
|
||||
{
|
||||
if (string.IsNullOrEmpty(keyword) == false)
|
||||
{
|
||||
if (scanner.CheckKeyword(keyword) == false)
|
||||
continue;
|
||||
}
|
||||
|
||||
var scanResult = ScanInternal(scanner);
|
||||
if (scanResult.Succeed == false)
|
||||
{
|
||||
Debug.LogError($"Scanner {scanner.ScannerName} failed ! {scanResult.ErrorInfo}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 扫描单项
|
||||
/// </summary>
|
||||
public static ScannerResult Scan(string scannerGUID)
|
||||
{
|
||||
AssetArtScanner scanner = GetScannerByGUID(scannerGUID);
|
||||
var scanResult = ScanInternal(scanner);
|
||||
if (scanResult.Succeed == false)
|
||||
{
|
||||
Debug.LogError($"Scanner {scanner.ScannerName} failed ! {scanResult.ErrorInfo}");
|
||||
}
|
||||
return scanResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取指定的扫描器
|
||||
/// </summary>
|
||||
public static AssetArtScanner GetScannerByGUID(string scannerGUID)
|
||||
{
|
||||
foreach (var scanner in Setting.Scanners)
|
||||
{
|
||||
if (scanner.ScannerGUID == scannerGUID)
|
||||
return scanner;
|
||||
}
|
||||
|
||||
Debug.LogWarning($"Not found scanner : {scannerGUID}");
|
||||
return null;
|
||||
}
|
||||
|
||||
// 扫描器编辑相关
|
||||
public static AssetArtScanner CreateScanner(string name, string desc)
|
||||
{
|
||||
AssetArtScanner scanner = new AssetArtScanner();
|
||||
scanner.ScannerGUID = System.Guid.NewGuid().ToString();
|
||||
scanner.ScannerName = name;
|
||||
scanner.ScannerDesc = desc;
|
||||
Setting.Scanners.Add(scanner);
|
||||
IsDirty = true;
|
||||
return scanner;
|
||||
}
|
||||
public static void RemoveScanner(AssetArtScanner scanner)
|
||||
{
|
||||
if (Setting.Scanners.Remove(scanner))
|
||||
{
|
||||
IsDirty = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"Failed remove scanner : {scanner.ScannerName}");
|
||||
}
|
||||
}
|
||||
public static void ModifyScanner(AssetArtScanner scanner)
|
||||
{
|
||||
if (scanner != null)
|
||||
{
|
||||
IsDirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
// 资源收集编辑相关
|
||||
public static void CreateCollector(AssetArtScanner scanner, AssetArtCollector collector)
|
||||
{
|
||||
scanner.Collectors.Add(collector);
|
||||
IsDirty = true;
|
||||
}
|
||||
public static void RemoveCollector(AssetArtScanner scanner, AssetArtCollector collector)
|
||||
{
|
||||
if (scanner.Collectors.Remove(collector))
|
||||
{
|
||||
IsDirty = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"Failed remove collector : {collector.CollectPath}");
|
||||
}
|
||||
}
|
||||
public static void ModifyCollector(AssetArtScanner scanner, AssetArtCollector collector)
|
||||
{
|
||||
if (scanner != null && collector != null)
|
||||
{
|
||||
IsDirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
private static ScannerResult ScanInternal(AssetArtScanner scanner)
|
||||
{
|
||||
if (scanner == null)
|
||||
return new ScannerResult("Scanner is null !");
|
||||
|
||||
string saveDirectory = "Assets/";
|
||||
if (string.IsNullOrEmpty(scanner.SaveDirectory) == false)
|
||||
{
|
||||
saveDirectory = scanner.SaveDirectory;
|
||||
if (Directory.Exists(saveDirectory) == false)
|
||||
return new ScannerResult($"Scanner save directory is invalid : {saveDirectory}");
|
||||
}
|
||||
|
||||
ScanReport report = scanner.RunScanner();
|
||||
if (report != null)
|
||||
{
|
||||
string filePath = $"{saveDirectory}/{scanner.ScannerName}_{scanner.ScannerDesc}.json";
|
||||
ScanReportConfig.ExportJsonConfig(filePath, report);
|
||||
return new ScannerResult(filePath, report);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new ScannerResult($"Scanner run failed : {scanner.ScannerName}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: fda10f23f6f36bf498b54323fe4f680b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,519 @@
|
|||
#if UNITY_2019_4_OR_NEWER
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEditor.UIElements;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
public class AssetArtScannerWindow : EditorWindow
|
||||
{
|
||||
[MenuItem("YooAsset/AssetArt Scanner", false, 301)]
|
||||
public static void OpenWindow()
|
||||
{
|
||||
AssetArtScannerWindow window = GetWindow<AssetArtScannerWindow>("资源扫描工具", true, WindowsDefine.DockedWindowTypes);
|
||||
window.minSize = new Vector2(800, 600);
|
||||
}
|
||||
|
||||
private Button _saveButton;
|
||||
private ListView _scannerListView;
|
||||
private ToolbarSearchField _scannerSearchField;
|
||||
private VisualElement _scannerContentContainer;
|
||||
private VisualElement _inspectorContainer;
|
||||
private Label _schemaGuideTxt;
|
||||
private TextField _scannerNameTxt;
|
||||
private TextField _scannerDescTxt;
|
||||
private ObjectField _scannerSchemaField;
|
||||
private ObjectField _outputFolderField;
|
||||
private ScrollView _collectorScrollView;
|
||||
|
||||
private int _lastModifyScannerIndex = 0;
|
||||
|
||||
|
||||
public void CreateGUI()
|
||||
{
|
||||
Undo.undoRedoPerformed -= RefreshWindow;
|
||||
Undo.undoRedoPerformed += RefreshWindow;
|
||||
|
||||
try
|
||||
{
|
||||
VisualElement root = this.rootVisualElement;
|
||||
|
||||
// 加载布局文件
|
||||
var visualAsset = UxmlLoader.LoadWindowUXML<AssetArtScannerWindow>();
|
||||
if (visualAsset == null)
|
||||
return;
|
||||
|
||||
visualAsset.CloneTree(root);
|
||||
|
||||
// 导入导出按钮
|
||||
var exportBtn = root.Q<Button>("ExportButton");
|
||||
exportBtn.clicked += ExportBtn_clicked;
|
||||
var importBtn = root.Q<Button>("ImportButton");
|
||||
importBtn.clicked += ImportBtn_clicked;
|
||||
|
||||
// 配置保存按钮
|
||||
_saveButton = root.Q<Button>("SaveButton");
|
||||
_saveButton.clicked += SaveBtn_clicked;
|
||||
|
||||
// 扫描按钮
|
||||
var scanAllBtn = root.Q<Button>("ScanAllButton");
|
||||
scanAllBtn.clicked += ScanAllBtn_clicked;
|
||||
var scanBtn = root.Q<Button>("ScanBtn");
|
||||
scanBtn.clicked += ScanBtn_clicked;
|
||||
|
||||
// 扫描列表相关
|
||||
_scannerListView = root.Q<ListView>("ScannerListView");
|
||||
_scannerListView.makeItem = MakeScannerListViewItem;
|
||||
_scannerListView.bindItem = BindScannerListViewItem;
|
||||
|
||||
#if UNITY_2022_3_OR_NEWER
|
||||
_scannerListView.selectionChanged += ScannerListView_onSelectionChange;
|
||||
#elif UNITY_2020_1_OR_NEWER
|
||||
_scannerListView.onSelectionChange += ScannerListView_onSelectionChange;
|
||||
#else
|
||||
_scannerListView.onSelectionChanged += ScannerListView_onSelectionChange;
|
||||
#endif
|
||||
|
||||
// 扫描列表过滤
|
||||
_scannerSearchField = root.Q<ToolbarSearchField>("ScannerSearchField");
|
||||
_scannerSearchField.RegisterValueChangedCallback(OnSearchKeyWordChange);
|
||||
|
||||
// 扫描器添加删除按钮
|
||||
var scannerAddContainer = root.Q("ScannerAddContainer");
|
||||
{
|
||||
var addBtn = scannerAddContainer.Q<Button>("AddBtn");
|
||||
addBtn.clicked += AddScannerBtn_clicked;
|
||||
var removeBtn = scannerAddContainer.Q<Button>("RemoveBtn");
|
||||
removeBtn.clicked += RemoveScannerBtn_clicked;
|
||||
}
|
||||
|
||||
// 扫描器容器
|
||||
_scannerContentContainer = root.Q("ScannerContentContainer");
|
||||
|
||||
// 检视界面容器
|
||||
_inspectorContainer = root.Q("InspectorContainer");
|
||||
|
||||
// 扫描器指南
|
||||
_schemaGuideTxt = root.Q<Label>("SchemaUserGuide");
|
||||
|
||||
// 扫描器名称
|
||||
_scannerNameTxt = root.Q<TextField>("ScannerName");
|
||||
_scannerNameTxt.RegisterValueChangedCallback(evt =>
|
||||
{
|
||||
var selectScanner = _scannerListView.selectedItem as AssetArtScanner;
|
||||
if (selectScanner != null)
|
||||
{
|
||||
selectScanner.ScannerName = evt.newValue;
|
||||
AssetArtScannerSettingData.ModifyScanner(selectScanner);
|
||||
FillScannerListViewData();
|
||||
}
|
||||
});
|
||||
|
||||
// 扫描器备注
|
||||
_scannerDescTxt = root.Q<TextField>("ScannerDesc");
|
||||
_scannerDescTxt.RegisterValueChangedCallback(evt =>
|
||||
{
|
||||
var selectScanner = _scannerListView.selectedItem as AssetArtScanner;
|
||||
if (selectScanner != null)
|
||||
{
|
||||
selectScanner.ScannerDesc = evt.newValue;
|
||||
AssetArtScannerSettingData.ModifyScanner(selectScanner);
|
||||
FillScannerListViewData();
|
||||
}
|
||||
});
|
||||
|
||||
// 扫描模式
|
||||
_scannerSchemaField = root.Q<ObjectField>("ScanSchema");
|
||||
_scannerSchemaField.RegisterValueChangedCallback(evt =>
|
||||
{
|
||||
var selectScanner = _scannerListView.selectedItem as AssetArtScanner;
|
||||
if (selectScanner != null)
|
||||
{
|
||||
string assetPath = AssetDatabase.GetAssetPath(evt.newValue);
|
||||
selectScanner.ScannerSchema = AssetDatabase.AssetPathToGUID(assetPath);
|
||||
AssetArtScannerSettingData.ModifyScanner(selectScanner);
|
||||
}
|
||||
});
|
||||
|
||||
// 存储目录
|
||||
_outputFolderField = root.Q<ObjectField>("OutputFolder");
|
||||
_outputFolderField.RegisterValueChangedCallback(evt =>
|
||||
{
|
||||
var selectScanner = _scannerListView.selectedItem as AssetArtScanner;
|
||||
if (selectScanner != null)
|
||||
{
|
||||
if (evt.newValue == null)
|
||||
{
|
||||
selectScanner.SaveDirectory = string.Empty;
|
||||
AssetArtScannerSettingData.ModifyScanner(selectScanner);
|
||||
}
|
||||
else
|
||||
{
|
||||
string assetPath = AssetDatabase.GetAssetPath(evt.newValue);
|
||||
if (AssetDatabase.IsValidFolder(assetPath))
|
||||
{
|
||||
selectScanner.SaveDirectory = assetPath;
|
||||
AssetArtScannerSettingData.ModifyScanner(selectScanner);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"Select asset object not folder ! {assetPath}");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 收集列表相关
|
||||
_collectorScrollView = root.Q<ScrollView>("CollectorScrollView");
|
||||
_collectorScrollView.style.height = new Length(100, LengthUnit.Percent);
|
||||
_collectorScrollView.viewDataKey = "scrollView";
|
||||
|
||||
// 收集器创建按钮
|
||||
var collectorAddContainer = root.Q("CollectorAddContainer");
|
||||
{
|
||||
var addBtn = collectorAddContainer.Q<Button>("AddBtn");
|
||||
addBtn.clicked += AddCollectorBtn_clicked;
|
||||
}
|
||||
|
||||
// 刷新窗体
|
||||
RefreshWindow();
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
Debug.LogError(e.ToString());
|
||||
}
|
||||
}
|
||||
public void OnDestroy()
|
||||
{
|
||||
// 注意:清空所有撤销操作
|
||||
Undo.ClearAll();
|
||||
|
||||
if (AssetArtScannerSettingData.IsDirty)
|
||||
AssetArtScannerSettingData.SaveFile();
|
||||
}
|
||||
public void Update()
|
||||
{
|
||||
if (_saveButton != null)
|
||||
{
|
||||
if (AssetArtScannerSettingData.IsDirty)
|
||||
{
|
||||
if (_saveButton.enabledSelf == false)
|
||||
_saveButton.SetEnabled(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_saveButton.enabledSelf)
|
||||
_saveButton.SetEnabled(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void RefreshWindow()
|
||||
{
|
||||
_scannerContentContainer.visible = false;
|
||||
|
||||
FillScannerListViewData();
|
||||
}
|
||||
private void ExportBtn_clicked()
|
||||
{
|
||||
string resultPath = EditorTools.OpenFolderPanel("Export JSON", "Assets/");
|
||||
if (resultPath != null)
|
||||
{
|
||||
AssetArtScannerConfig.ExportJsonConfig($"{resultPath}/AssetArtScannerConfig.json");
|
||||
}
|
||||
}
|
||||
private void ImportBtn_clicked()
|
||||
{
|
||||
string resultPath = EditorTools.OpenFilePath("Import JSON", "Assets/", "json");
|
||||
if (resultPath != null)
|
||||
{
|
||||
AssetArtScannerConfig.ImportJsonConfig(resultPath);
|
||||
RefreshWindow();
|
||||
}
|
||||
}
|
||||
private void SaveBtn_clicked()
|
||||
{
|
||||
AssetArtScannerSettingData.SaveFile();
|
||||
}
|
||||
private void ScanAllBtn_clicked()
|
||||
{
|
||||
string searchKeyWord = _scannerSearchField.value;
|
||||
AssetArtScannerSettingData.ScanAll(searchKeyWord);
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
private void ScanBtn_clicked()
|
||||
{
|
||||
var selectScanner = _scannerListView.selectedItem as AssetArtScanner;
|
||||
if (selectScanner == null)
|
||||
return;
|
||||
|
||||
ScannerResult scannerResult = AssetArtScannerSettingData.Scan(selectScanner.ScannerGUID);
|
||||
if (scannerResult.Succeed)
|
||||
{
|
||||
// 自动打开报告界面
|
||||
scannerResult.OpenReportWindow();
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
}
|
||||
private void OnSearchKeyWordChange(ChangeEvent<string> e)
|
||||
{
|
||||
_lastModifyScannerIndex = 0;
|
||||
RefreshWindow();
|
||||
}
|
||||
|
||||
// 分组列表相关
|
||||
private void FillScannerListViewData()
|
||||
{
|
||||
_scannerListView.Clear();
|
||||
_scannerListView.ClearSelection();
|
||||
_scannerListView.itemsSource = FilterScanners();
|
||||
_scannerListView.Rebuild();
|
||||
|
||||
if (_lastModifyScannerIndex >= 0 && _lastModifyScannerIndex < _scannerListView.itemsSource.Count)
|
||||
{
|
||||
_scannerListView.selectedIndex = _lastModifyScannerIndex;
|
||||
}
|
||||
}
|
||||
private List<AssetArtScanner> FilterScanners()
|
||||
{
|
||||
string searchKeyWord = _scannerSearchField.value;
|
||||
List<AssetArtScanner> result = new List<AssetArtScanner>(AssetArtScannerSettingData.Setting.Scanners.Count);
|
||||
|
||||
// 过滤列表
|
||||
foreach (var scanner in AssetArtScannerSettingData.Setting.Scanners)
|
||||
{
|
||||
if (string.IsNullOrEmpty(searchKeyWord) == false)
|
||||
{
|
||||
if (scanner.CheckKeyword(searchKeyWord) == false)
|
||||
continue;
|
||||
}
|
||||
result.Add(scanner);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
private VisualElement MakeScannerListViewItem()
|
||||
{
|
||||
VisualElement element = new VisualElement();
|
||||
|
||||
{
|
||||
var label = new Label();
|
||||
label.name = "Label1";
|
||||
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||
label.style.flexGrow = 1f;
|
||||
label.style.height = 20f;
|
||||
element.Add(label);
|
||||
}
|
||||
|
||||
return element;
|
||||
}
|
||||
private void BindScannerListViewItem(VisualElement element, int index)
|
||||
{
|
||||
List<AssetArtScanner> sourceList = _scannerListView.itemsSource as List<AssetArtScanner>;
|
||||
var scanner = sourceList[index];
|
||||
var textField1 = element.Q<Label>("Label1");
|
||||
if (string.IsNullOrEmpty(scanner.ScannerDesc))
|
||||
textField1.text = scanner.ScannerName;
|
||||
else
|
||||
textField1.text = $"{scanner.ScannerName} ({scanner.ScannerDesc})";
|
||||
}
|
||||
private void ScannerListView_onSelectionChange(IEnumerable<object> objs)
|
||||
{
|
||||
var selectScanner = _scannerListView.selectedItem as AssetArtScanner;
|
||||
if (selectScanner == null)
|
||||
{
|
||||
_scannerContentContainer.visible = false;
|
||||
return;
|
||||
}
|
||||
|
||||
_scannerContentContainer.visible = true;
|
||||
_lastModifyScannerIndex = _scannerListView.selectedIndex;
|
||||
_scannerNameTxt.SetValueWithoutNotify(selectScanner.ScannerName);
|
||||
_scannerDescTxt.SetValueWithoutNotify(selectScanner.ScannerDesc);
|
||||
|
||||
// 显示检视面板
|
||||
var scanSchema = selectScanner.LoadSchema();
|
||||
if (scanSchema != null)
|
||||
{
|
||||
var inspector = scanSchema.CreateInspector();
|
||||
if (inspector == null)
|
||||
{
|
||||
UIElementsTools.SetElementVisible(_inspectorContainer, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (inspector.Containner is VisualElement container)
|
||||
{
|
||||
UIElementsTools.SetElementVisible(_inspectorContainer, true);
|
||||
_inspectorContainer.Clear();
|
||||
_inspectorContainer.Add(container);
|
||||
_inspectorContainer.style.width = inspector.Width;
|
||||
_inspectorContainer.style.minWidth = inspector.MinWidth;
|
||||
_inspectorContainer.style.maxWidth = inspector.MaxWidth;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"{nameof(ScannerSchema)} inspector container is invalid !");
|
||||
UIElementsTools.SetElementVisible(_inspectorContainer, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 设置Schema对象
|
||||
if (scanSchema == null)
|
||||
{
|
||||
_scannerSchemaField.SetValueWithoutNotify(null);
|
||||
_schemaGuideTxt.text = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
_scannerSchemaField.SetValueWithoutNotify(scanSchema);
|
||||
_schemaGuideTxt.text = scanSchema.GetUserGuide();
|
||||
}
|
||||
|
||||
// 显示存储目录
|
||||
DefaultAsset saveFolder = AssetDatabase.LoadAssetAtPath<DefaultAsset>(selectScanner.SaveDirectory);
|
||||
if (saveFolder == null)
|
||||
{
|
||||
_outputFolderField.SetValueWithoutNotify(null);
|
||||
}
|
||||
else
|
||||
{
|
||||
_outputFolderField.SetValueWithoutNotify(saveFolder);
|
||||
}
|
||||
|
||||
FillCollectorViewData();
|
||||
}
|
||||
private void AddScannerBtn_clicked()
|
||||
{
|
||||
Undo.RecordObject(AssetArtScannerSettingData.Setting, "YooAsset.AssetArtScannerWindow AddScanner");
|
||||
AssetArtScannerSettingData.CreateScanner("Default Scanner", string.Empty);
|
||||
FillScannerListViewData();
|
||||
}
|
||||
private void RemoveScannerBtn_clicked()
|
||||
{
|
||||
var selectScanner = _scannerListView.selectedItem as AssetArtScanner;
|
||||
if (selectScanner == null)
|
||||
return;
|
||||
|
||||
Undo.RecordObject(AssetArtScannerSettingData.Setting, "YooAsset.AssetArtScannerWindow RemoveScanner");
|
||||
AssetArtScannerSettingData.RemoveScanner(selectScanner);
|
||||
FillScannerListViewData();
|
||||
}
|
||||
|
||||
// 收集列表相关
|
||||
private void FillCollectorViewData()
|
||||
{
|
||||
var selectScanner = _scannerListView.selectedItem as AssetArtScanner;
|
||||
if (selectScanner == null)
|
||||
return;
|
||||
|
||||
// 填充数据
|
||||
_collectorScrollView.Clear();
|
||||
for (int i = 0; i < selectScanner.Collectors.Count; i++)
|
||||
{
|
||||
VisualElement element = MakeCollectorListViewItem();
|
||||
BindCollectorListViewItem(element, i);
|
||||
_collectorScrollView.Add(element);
|
||||
}
|
||||
}
|
||||
private VisualElement MakeCollectorListViewItem()
|
||||
{
|
||||
VisualElement element = new VisualElement();
|
||||
|
||||
VisualElement elementTop = new VisualElement();
|
||||
elementTop.style.flexDirection = FlexDirection.Row;
|
||||
element.Add(elementTop);
|
||||
|
||||
VisualElement elementSpace = new VisualElement();
|
||||
elementSpace.style.flexDirection = FlexDirection.Column;
|
||||
element.Add(elementSpace);
|
||||
|
||||
// Top VisualElement
|
||||
{
|
||||
var button = new Button();
|
||||
button.name = "Button1";
|
||||
button.text = "-";
|
||||
button.style.unityTextAlign = TextAnchor.MiddleCenter;
|
||||
button.style.flexGrow = 0f;
|
||||
elementTop.Add(button);
|
||||
}
|
||||
{
|
||||
var objectField = new ObjectField();
|
||||
objectField.name = "ObjectField1";
|
||||
objectField.label = "Collector";
|
||||
objectField.objectType = typeof(UnityEngine.Object);
|
||||
objectField.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||
objectField.style.flexGrow = 1f;
|
||||
elementTop.Add(objectField);
|
||||
var label = objectField.Q<Label>();
|
||||
label.style.minWidth = 63;
|
||||
}
|
||||
|
||||
// Space VisualElement
|
||||
{
|
||||
var label = new Label();
|
||||
label.style.height = 10;
|
||||
elementSpace.Add(label);
|
||||
}
|
||||
|
||||
return element;
|
||||
}
|
||||
private void BindCollectorListViewItem(VisualElement element, int index)
|
||||
{
|
||||
var selectScanner = _scannerListView.selectedItem as AssetArtScanner;
|
||||
if (selectScanner == null)
|
||||
return;
|
||||
|
||||
var collector = selectScanner.Collectors[index];
|
||||
var collectObject = AssetDatabase.LoadAssetAtPath<UnityEngine.Object>(collector.CollectPath);
|
||||
if (collectObject != null)
|
||||
collectObject.name = collector.CollectPath;
|
||||
|
||||
// Remove Button
|
||||
var removeBtn = element.Q<Button>("Button1");
|
||||
removeBtn.clicked += () =>
|
||||
{
|
||||
RemoveCollectorBtn_clicked(collector);
|
||||
};
|
||||
|
||||
// Collector Path
|
||||
var objectField1 = element.Q<ObjectField>("ObjectField1");
|
||||
objectField1.SetValueWithoutNotify(collectObject);
|
||||
objectField1.RegisterValueChangedCallback(evt =>
|
||||
{
|
||||
collector.CollectPath = AssetDatabase.GetAssetPath(evt.newValue);
|
||||
objectField1.value.name = collector.CollectPath;
|
||||
AssetArtScannerSettingData.ModifyCollector(selectScanner, collector);
|
||||
});
|
||||
}
|
||||
private void AddCollectorBtn_clicked()
|
||||
{
|
||||
var selectSacnner = _scannerListView.selectedItem as AssetArtScanner;
|
||||
if (selectSacnner == null)
|
||||
return;
|
||||
|
||||
Undo.RecordObject(AssetArtScannerSettingData.Setting, "YooAsset.AssetArtScannerWindow AddCollector");
|
||||
AssetArtCollector collector = new AssetArtCollector();
|
||||
AssetArtScannerSettingData.CreateCollector(selectSacnner, collector);
|
||||
FillCollectorViewData();
|
||||
}
|
||||
private void RemoveCollectorBtn_clicked(AssetArtCollector selectCollector)
|
||||
{
|
||||
var selectSacnner = _scannerListView.selectedItem as AssetArtScanner;
|
||||
if (selectSacnner == null)
|
||||
return;
|
||||
if (selectCollector == null)
|
||||
return;
|
||||
|
||||
Undo.RecordObject(AssetArtScannerSettingData.Setting, "YooAsset.AssetArtScannerWindow RemoveCollector");
|
||||
AssetArtScannerSettingData.RemoveCollector(selectSacnner, selectCollector);
|
||||
FillCollectorViewData();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bff583b32bbeb7e498920bfdc84dba90
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,35 @@
|
|||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="True">
|
||||
<uie:Toolbar name="Toolbar" style="display: flex; flex-direction: row-reverse;">
|
||||
<ui:Button text="Save" display-tooltip-when-elided="true" name="SaveButton" style="width: 50px; background-color: rgb(56, 147, 58);" />
|
||||
<ui:Button text="导出" display-tooltip-when-elided="true" name="ExportButton" style="width: 50px; background-color: rgb(56, 147, 58);" />
|
||||
<ui:Button text="导入" display-tooltip-when-elided="true" name="ImportButton" style="width: 50px; background-color: rgb(56, 147, 58);" />
|
||||
</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:Button text="Scan All" display-tooltip-when-elided="true" name="ScanAllButton" style="height: 25px; -unity-font-style: bold;" />
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement name="ContentContainer" style="flex-grow: 1; flex-direction: row;">
|
||||
<ui:VisualElement name="ScannerListContainer" style="width: 250px; flex-grow: 0; background-color: rgb(67, 67, 67); 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="ScannerListTitle" style="background-color: rgb(89, 89, 89); -unity-text-align: upper-center; -unity-font-style: bold; border-left-width: 3px; border-right-width: 3px; border-top-width: 3px; border-bottom-width: 3px; font-size: 12px;" />
|
||||
<uie:ToolbarSearchField focusable="true" name="ScannerSearchField" style="width: 230px;" />
|
||||
<ui:ListView focusable="true" name="ScannerListView" item-height="20" virtualization-method="DynamicHeight" style="flex-grow: 1;" />
|
||||
<ui:VisualElement name="ScannerAddContainer" style="justify-content: center; flex-direction: row; flex-shrink: 0;">
|
||||
<ui:Button text=" - " display-tooltip-when-elided="true" name="RemoveBtn" />
|
||||
<ui:Button text=" + " display-tooltip-when-elided="true" name="AddBtn" />
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement name="ScannerContentContainer" style="flex-grow: 1; border-left-width: 5px; border-right-width: 5px; border-top-width: 5px; border-bottom-width: 5px; min-width: 400px;">
|
||||
<ui:Label text="扫描器" display-tooltip-when-elided="true" name="ScannerContentTitle" style="-unity-text-align: upper-center; -unity-font-style: bold; font-size: 12px; border-top-width: 3px; border-right-width: 3px; border-bottom-width: 3px; border-left-width: 3px; background-color: rgb(89, 89, 89);" />
|
||||
<ui:Label display-tooltip-when-elided="true" name="SchemaUserGuide" style="-unity-text-align: upper-center; -unity-font-style: bold; border-left-width: 5px; border-right-width: 5px; border-top-width: 5px; border-bottom-width: 5px; font-size: 12px; height: 40px;" />
|
||||
<ui:TextField picking-mode="Ignore" label="Scanner Name" name="ScannerName" />
|
||||
<ui:TextField picking-mode="Ignore" label="Scanner Desc" name="ScannerDesc" />
|
||||
<uie:ObjectField label="Scanner Schema" name="ScanSchema" type="YooAsset.Editor.ScannerSchema, YooAsset.Editor" allow-scene-objects="false" />
|
||||
<uie:ObjectField label="Output Folder" name="OutputFolder" type="UnityEditor.DefaultAsset, UnityEditor.CoreModule" allow-scene-objects="false" />
|
||||
<ui:VisualElement name="CollectorAddContainer" style="height: 20px; flex-direction: row-reverse;">
|
||||
<ui:Button text="[ + ]" display-tooltip-when-elided="true" name="AddBtn" />
|
||||
<ui:Button text="Scan" display-tooltip-when-elided="true" name="ScanBtn" style="width: 60px;" />
|
||||
</ui:VisualElement>
|
||||
<ui:ScrollView name="CollectorScrollView" style="flex-grow: 1;" />
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement name="InspectorContainer" style="flex-grow: 1; border-top-width: 5px; border-right-width: 5px; border-bottom-width: 5px; border-left-width: 5px; background-color: rgb(67, 67, 67);" />
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5bbb873a7bee2924a86c876b67bb2cb4
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
public class ScannerDefine
|
||||
{
|
||||
/// <summary>
|
||||
/// 报告文件签名
|
||||
/// </summary>
|
||||
public const string ReportFileSign = "596f6f4172745265706f7274";
|
||||
|
||||
/// <summary>
|
||||
/// 配置文件签名
|
||||
/// </summary>
|
||||
public const string SettingFileSign = "596f6f41727453657474696e67";
|
||||
|
||||
/// <summary>
|
||||
/// 报告文件的版本
|
||||
/// </summary>
|
||||
public const string ReportFileVersion = "1.0";
|
||||
|
||||
/// <summary>
|
||||
/// 配置文件的版本
|
||||
/// </summary>
|
||||
public const string SettingFileVersion = "1.0";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ed658bfc32cbfc44caf262a741a7c387
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,59 @@
|
|||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
public class ScannerResult
|
||||
{
|
||||
/// <summary>
|
||||
/// 生成的报告文件路径
|
||||
/// </summary>
|
||||
public string ReprotFilePath { private set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 报告对象
|
||||
/// </summary>
|
||||
public ScanReport Report { private set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 错误信息
|
||||
/// </summary>
|
||||
public string ErrorInfo { private set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否成功
|
||||
/// </summary>
|
||||
public bool Succeed
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrEmpty(ErrorInfo))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public ScannerResult(string error)
|
||||
{
|
||||
ErrorInfo = error;
|
||||
}
|
||||
public ScannerResult(string filePath, ScanReport report)
|
||||
{
|
||||
ReprotFilePath = filePath;
|
||||
Report = report;
|
||||
ErrorInfo = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 打开报告窗口
|
||||
/// </summary>
|
||||
public void OpenReportWindow()
|
||||
{
|
||||
if (Succeed)
|
||||
{
|
||||
var reproterWindow = AssetArtReporterWindow.OpenWindow();
|
||||
reproterWindow.ImportSingleReprotFile(ReprotFilePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e10cdab189d80b142ad5903d12956c59
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,32 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
public abstract class ScannerSchema : ScriptableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取用户指南信息
|
||||
/// </summary>
|
||||
public abstract string GetUserGuide();
|
||||
|
||||
/// <summary>
|
||||
/// 运行生成扫描报告
|
||||
/// </summary>
|
||||
public abstract ScanReport RunScanner(AssetArtScanner scanner);
|
||||
|
||||
/// <summary>
|
||||
/// 修复扫描结果
|
||||
/// </summary>
|
||||
public abstract void FixResult(List<ReportElement> fixList);
|
||||
|
||||
/// <summary>
|
||||
/// 创建检视面板
|
||||
/// </summary>
|
||||
public virtual SchemaInspector CreateInspector()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: eb6a587c72ccecc4ab6d386063cf0736
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
public class SchemaInspector
|
||||
{
|
||||
/// <summary>
|
||||
/// 检视界面的UI元素容器(UIElements元素)
|
||||
/// </summary>
|
||||
public object Containner;
|
||||
|
||||
/// <summary>
|
||||
/// 检视界面宽度
|
||||
/// </summary>
|
||||
public int Width = 250;
|
||||
|
||||
/// <summary>
|
||||
/// 检视界面最小宽度
|
||||
/// </summary>
|
||||
public int MinWidth = 250;
|
||||
|
||||
/// <summary>
|
||||
/// 检视界面最大宽度
|
||||
/// </summary>
|
||||
public int MaxWidth = 250;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3440549fcb36bbf4c8c6da17fb858947
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -32,7 +32,7 @@ namespace YooAsset.Editor
|
|||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,12 @@ namespace YooAsset.Editor
|
|||
public class ButtonCell : ITableCell, IComparable
|
||||
{
|
||||
public object CellValue { set; get; }
|
||||
public string SearchTag { private set; get; }
|
||||
|
||||
public ButtonCell(string searchTag)
|
||||
{
|
||||
SearchTag = searchTag;
|
||||
}
|
||||
public object GetDisplayObject()
|
||||
{
|
||||
return string.Empty;
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace YooAsset.Editor
|
|||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace YooAsset.Editor
|
|||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace YooAsset.Editor
|
|||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#if UNITY_2019_4_OR_NEWER
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
|
@ -18,10 +16,19 @@ namespace YooAsset.Editor
|
|||
/// </summary>
|
||||
public IList<ITableCell> Cells { set; get; } = new List<ITableCell>();
|
||||
|
||||
#region 添加默认的单元格数据
|
||||
public void AddButtonCell()
|
||||
|
||||
/// <summary>
|
||||
/// 添加单元格数据
|
||||
/// </summary>
|
||||
public void AddCell(ITableCell cell)
|
||||
{
|
||||
var cell = new ButtonCell();
|
||||
Cells.Add(cell);
|
||||
}
|
||||
|
||||
#region 添加默认的单元格数据
|
||||
public void AddButtonCell(string searchTag)
|
||||
{
|
||||
var cell = new ButtonCell(searchTag);
|
||||
Cells.Add(cell);
|
||||
}
|
||||
public void AddAssetPathCell(string searchTag, string path)
|
||||
|
|
|
@ -52,6 +52,23 @@ namespace YooAsset.Editor
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 选中的数据列表
|
||||
/// </summary>
|
||||
public List<ITableData> selectedItems
|
||||
{
|
||||
get
|
||||
{
|
||||
#if UNITY_2020_3_OR_NEWER
|
||||
return _listView.selectedItems.Cast<ITableData>().ToList();
|
||||
#else
|
||||
List<ITableData> result = new List<ITableData>();
|
||||
result.Add(_listView.selectedItem as ITableData);
|
||||
return result;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 单元视图交互事件
|
||||
/// </summary>
|
||||
|
@ -76,6 +93,7 @@ namespace YooAsset.Editor
|
|||
_listView = new ListView();
|
||||
_listView.makeItem = MakeListViewElement;
|
||||
_listView.bindItem = BindListViewElement;
|
||||
_listView.selectionType = SelectionType.Multiple;
|
||||
_listView.RegisterCallback<PointerDownEvent>(OnClickListItem);
|
||||
|
||||
#if UNITY_2022_3_OR_NEWER
|
||||
|
|
|
@ -1,53 +1,153 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6e3730451fa077346abd4ac642ea71d8
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 128
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 0
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
textureType: -1
|
||||
buildTargetSettings: []
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 1
|
||||
swizzle: 50462976
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
|
@ -1,53 +1,153 @@
|
|||
fileFormatVersion: 2
|
||||
guid: fd3cbf51780694849b9b019b36a3938e
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 128
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 0
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
textureType: -1
|
||||
buildTargetSettings: []
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 1
|
||||
swizzle: 50462976
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
|
@ -1,53 +1,153 @@
|
|||
fileFormatVersion: 2
|
||||
guid: eabb37cb6d738b443b398b701a64cd88
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 128
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 0
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
textureType: -1
|
||||
buildTargetSettings: []
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 1
|
||||
swizzle: 50462976
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
|
@ -1,53 +1,153 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3e504a46a8fcec34db3c4776530c6eb2
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 128
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 0
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
textureType: -1
|
||||
buildTargetSettings: []
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 1
|
||||
swizzle: 50462976
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
|
@ -1,53 +1,153 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0963e6c65b2b1f74d9f455e21901e2dc
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 128
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 0
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
textureType: -1
|
||||
buildTargetSettings: []
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 1
|
||||
swizzle: 50462976
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
|
@ -1,53 +1,153 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2cb5eef4d7d7bf6459dd13a3f8d90246
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 128
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 0
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
textureType: -1
|
||||
buildTargetSettings: []
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 1
|
||||
swizzle: 50462976
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
|
@ -1,53 +1,153 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 04dbc0581071c254ea6564b2ff06ff9b
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 128
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 0
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
textureType: -1
|
||||
buildTargetSettings: []
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 1
|
||||
swizzle: 50462976
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
|
@ -1,53 +1,153 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7e91cd9bad7babf4b975882a4b7453cb
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 128
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 0
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
textureType: -1
|
||||
buildTargetSettings: []
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 1
|
||||
swizzle: 50462976
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
|
@ -1,53 +1,153 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1478894bc9a1ed241b05b0862a7b8bce
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 128
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 0
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
textureType: -1
|
||||
buildTargetSettings: []
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 1
|
||||
swizzle: 50462976
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
|
@ -1,53 +1,153 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1c89236d45255234ebd1d39657ff7e02
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 128
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 0
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
textureType: -1
|
||||
buildTargetSettings: []
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 1
|
||||
swizzle: 50462976
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e011c0de116e3214cabe88ae742c5d19
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,67 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using YooAsset.Editor;
|
||||
|
||||
public class SchemaTools
|
||||
{
|
||||
/// <summary>
|
||||
/// 通用扫描快捷方法
|
||||
/// </summary>
|
||||
public static List<ReportElement> ScanAssets(string[] scanAssetList, System.Func<string, ReportElement> scanFun, int unloadAssetLimit = int.MaxValue)
|
||||
{
|
||||
int scanNumber = 0;
|
||||
int progressCount = 0;
|
||||
int totalCount = scanAssetList.Length;
|
||||
List<ReportElement> results = new List<ReportElement>(totalCount);
|
||||
|
||||
EditorTools.ClearProgressBar();
|
||||
foreach (string assetPath in scanAssetList)
|
||||
{
|
||||
scanNumber++;
|
||||
progressCount++;
|
||||
EditorTools.DisplayProgressBar("扫描中...", progressCount, totalCount);
|
||||
var scanResult = scanFun.Invoke(assetPath);
|
||||
if (scanResult != null)
|
||||
results.Add(scanResult);
|
||||
|
||||
// 释放编辑器未使用的资源
|
||||
if (scanNumber >= unloadAssetLimit)
|
||||
{
|
||||
scanNumber = 0;
|
||||
EditorUtility.UnloadUnusedAssetsImmediate(true);
|
||||
}
|
||||
}
|
||||
EditorTools.ClearProgressBar();
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 通用修复快捷方法
|
||||
/// </summary>
|
||||
public static void FixAssets(List<ReportElement> fixAssetList, System.Action<ReportElement> fixFun, int unloadAssetLimit = int.MaxValue)
|
||||
{
|
||||
int scanNumber = 0;
|
||||
int totalCount = fixAssetList.Count;
|
||||
int progressCount = 0;
|
||||
EditorTools.ClearProgressBar();
|
||||
foreach (var scanResult in fixAssetList)
|
||||
{
|
||||
scanNumber++;
|
||||
progressCount++;
|
||||
EditorTools.DisplayProgressBar("修复中...", progressCount, totalCount);
|
||||
fixFun.Invoke(scanResult);
|
||||
|
||||
// 释放编辑器未使用的资源
|
||||
if (scanNumber >= unloadAssetLimit)
|
||||
{
|
||||
scanNumber = 0;
|
||||
EditorUtility.UnloadUnusedAssetsImmediate(true);
|
||||
}
|
||||
}
|
||||
EditorTools.ClearProgressBar();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 97a68688a58fbb24ba31cd80e808d315
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,190 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using YooAsset.Editor;
|
||||
|
||||
#if UNITY_2019_4_OR_NEWER
|
||||
using UnityEditor.UIElements;
|
||||
using UnityEngine.UIElements;
|
||||
#endif
|
||||
|
||||
[CreateAssetMenu(fileName = "TextureSchema", menuName = "YooAssetArt/Create TextureSchema")]
|
||||
public class TextureSchema : ScannerSchema
|
||||
{
|
||||
/// <summary>
|
||||
/// 图片最大宽度
|
||||
/// </summary>
|
||||
public int MaxWidth = 1024;
|
||||
|
||||
/// <summary>
|
||||
/// 图片最大高度
|
||||
/// </summary>
|
||||
public int MaxHeight = 1024;
|
||||
|
||||
/// <summary>
|
||||
/// 获取用户指南信息
|
||||
/// </summary>
|
||||
public override string GetUserGuide()
|
||||
{
|
||||
return "规则介绍:检测图片的格式,尺寸";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 运行生成扫描报告
|
||||
/// </summary>
|
||||
public override ScanReport RunScanner(AssetArtScanner scanner)
|
||||
{
|
||||
// 创建扫描报告
|
||||
string title = "扫描所有位图字体";
|
||||
string desc = GetUserGuide();
|
||||
var report = new ScanReport(title, desc);
|
||||
report.AddHeader("资源路径", 300).SetStretchable().SetSearchable().SetSortable().SetHeaderType(EHeaderType.AssetPath);
|
||||
report.AddHeader("图片宽度", 100).SetSortable().SetHeaderType(EHeaderType.LongValue);
|
||||
report.AddHeader("图片高度", 100).SetSortable().SetHeaderType(EHeaderType.LongValue);
|
||||
report.AddHeader("内存大小", 100).SetSortable().SetHeaderType(EHeaderType.LongValue);
|
||||
report.AddHeader("苹果格式", 100);
|
||||
report.AddHeader("安卓格式", 100);
|
||||
report.AddHeader("错误信息", 200).SetStretchable();
|
||||
|
||||
// 获取扫描资源集合
|
||||
var searchDirectorys = scanner.Collectors.Select(c => { return c.CollectPath; });
|
||||
string[] findAssets = EditorTools.FindAssets(EAssetSearchType.Texture, searchDirectorys.ToArray());
|
||||
|
||||
// 开始扫描资源集合
|
||||
var results = SchemaTools.ScanAssets(findAssets, ScanAssetInternal);
|
||||
report.ReportElements.AddRange(results);
|
||||
return report;
|
||||
}
|
||||
private ReportElement ScanAssetInternal(string assetPath)
|
||||
{
|
||||
var importer = TextureTools.GetAssetImporter(assetPath);
|
||||
if (importer == null)
|
||||
return null;
|
||||
|
||||
// 加载纹理对象
|
||||
var texture = AssetDatabase.LoadAssetAtPath<Texture>(assetPath);
|
||||
var assetGUID = AssetDatabase.AssetPathToGUID(assetPath);
|
||||
var iosFormat = TextureTools.GetPlatformIOSFormat(importer);
|
||||
var androidFormat = TextureTools.GetPlatformAndroidFormat(importer);
|
||||
var memorySize = TextureTools.GetStorageMemorySize(texture);
|
||||
|
||||
// 获取错误信息
|
||||
string errorInfo = string.Empty;
|
||||
{
|
||||
// 苹果格式
|
||||
if (iosFormat != TextureImporterFormat.ASTC_4x4)
|
||||
{
|
||||
errorInfo += " | ";
|
||||
errorInfo += "苹果格式不对";
|
||||
}
|
||||
|
||||
// 安卓格式
|
||||
if (androidFormat != TextureImporterFormat.ASTC_4x4)
|
||||
{
|
||||
errorInfo += " | ";
|
||||
errorInfo += "安卓格式不对";
|
||||
}
|
||||
|
||||
// 多级纹理
|
||||
if (importer.isReadable)
|
||||
{
|
||||
errorInfo += " | ";
|
||||
errorInfo += "开启了可读写";
|
||||
}
|
||||
|
||||
// 超大纹理
|
||||
if (texture.width > MaxWidth || texture.height > MaxHeight)
|
||||
{
|
||||
errorInfo += " | ";
|
||||
errorInfo += "超大纹理";
|
||||
}
|
||||
}
|
||||
|
||||
// 添加扫描信息
|
||||
ReportElement result = new ReportElement(assetGUID);
|
||||
result.AddScanInfo("资源路径", assetPath);
|
||||
result.AddScanInfo("图片宽度", texture.width.ToString());
|
||||
result.AddScanInfo("图片高度", texture.height.ToString());
|
||||
result.AddScanInfo("内存大小", memorySize.ToString());
|
||||
result.AddScanInfo("苹果格式", iosFormat.ToString());
|
||||
result.AddScanInfo("安卓格式", androidFormat.ToString());
|
||||
result.AddScanInfo("错误信息", errorInfo);
|
||||
|
||||
// 判断是否通过
|
||||
result.Passes = string.IsNullOrEmpty(errorInfo);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修复扫描结果
|
||||
/// </summary>
|
||||
public override void FixResult(List<ReportElement> fixList)
|
||||
{
|
||||
SchemaTools.FixAssets(fixList, FixAssetInternal);
|
||||
}
|
||||
private void FixAssetInternal(ReportElement result)
|
||||
{
|
||||
var scanInfo = result.GetScanInfo("资源路径");
|
||||
var assetPath = scanInfo.ScanInfo;
|
||||
var importer = TextureTools.GetAssetImporter(assetPath);
|
||||
if (importer == null)
|
||||
return;
|
||||
|
||||
// 苹果格式
|
||||
var iosPlatformSetting = TextureTools.GetPlatformIOSSettings(importer);
|
||||
iosPlatformSetting.format = TextureImporterFormat.ASTC_4x4;
|
||||
iosPlatformSetting.overridden = true;
|
||||
|
||||
// 安卓格式
|
||||
var androidPlatformSetting = TextureTools.GetPlatformAndroidSettings(importer);
|
||||
androidPlatformSetting.format = TextureImporterFormat.ASTC_4x4;
|
||||
androidPlatformSetting.overridden = true;
|
||||
|
||||
// 可读写
|
||||
importer.isReadable = false;
|
||||
|
||||
// 保存配置
|
||||
importer.SetPlatformTextureSettings(iosPlatformSetting);
|
||||
importer.SetPlatformTextureSettings(androidPlatformSetting);
|
||||
importer.SaveAndReimport();
|
||||
Debug.Log($"修复了 : {assetPath}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 创建检视面板对
|
||||
/// </summary>
|
||||
public override SchemaInspector CreateInspector()
|
||||
{
|
||||
#if UNITY_2019_4_OR_NEWER
|
||||
var container = new VisualElement();
|
||||
|
||||
// 图片最大宽度
|
||||
var maxWidthField = new IntegerField();
|
||||
maxWidthField.label = "图片最大宽度";
|
||||
maxWidthField.SetValueWithoutNotify(MaxWidth);
|
||||
maxWidthField.RegisterValueChangedCallback((evt) =>
|
||||
{
|
||||
MaxWidth = evt.newValue;
|
||||
});
|
||||
container.Add(maxWidthField);
|
||||
|
||||
// 图片最大高度
|
||||
var maxHeightField = new IntegerField();
|
||||
maxHeightField.label = "图片最大高度";
|
||||
maxHeightField.SetValueWithoutNotify(MaxHeight);
|
||||
maxHeightField.RegisterValueChangedCallback((evt) =>
|
||||
{
|
||||
MaxHeight = evt.newValue;
|
||||
});
|
||||
container.Add(maxHeightField);
|
||||
|
||||
SchemaInspector inspector = new SchemaInspector();
|
||||
inspector.Containner = container;
|
||||
return inspector;
|
||||
#else
|
||||
return null;
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 01b3d3fde6899514396008e1e4f6693b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,104 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using YooAsset.Editor;
|
||||
|
||||
public class TextureTools
|
||||
{
|
||||
/// <summary>
|
||||
/// POT尺寸检测
|
||||
/// </summary>
|
||||
public static bool IsPowerOfTwo(Texture tex)
|
||||
{
|
||||
if (Mathf.IsPowerOfTwo(tex.width) == false)
|
||||
return false;
|
||||
|
||||
if (Mathf.IsPowerOfTwo(tex.height) == false)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取纹理运行时内存大小
|
||||
/// </summary>
|
||||
public static long GetStorageMemorySize(Texture tex)
|
||||
{
|
||||
#if UNITY_2022_3_OR_NEWER
|
||||
var assembly = typeof(AssetDatabase).Assembly;
|
||||
var type = assembly.GetType("UnityEditor.TextureUtil");
|
||||
long size = (long)EditorTools.InvokePublicStaticMethod(type, "GetStorageMemorySizeLong", tex);
|
||||
return size;
|
||||
#else
|
||||
var assembly = typeof(AssetDatabase).Assembly;
|
||||
var type = assembly.GetType("UnityEditor.TextureUtil");
|
||||
int size = (int)EditorTools.InvokePublicStaticMethod(type, "GetStorageMemorySize", tex);
|
||||
return size;
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前平台纹理的格式
|
||||
/// </summary>
|
||||
public static TextureFormat GetCurrentPlatformTextureFormat(Texture tex)
|
||||
{
|
||||
var assembly = typeof(AssetDatabase).Assembly;
|
||||
var type = assembly.GetType("UnityEditor.TextureUtil");
|
||||
TextureFormat format = (TextureFormat)EditorTools.InvokePublicStaticMethod(type, "GetTextureFormat", tex);
|
||||
return format;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取纹理的导入器
|
||||
/// </summary>
|
||||
public static TextureImporter GetAssetImporter(string assetPath)
|
||||
{
|
||||
TextureImporter importer = AssetImporter.GetAtPath(assetPath) as TextureImporter;
|
||||
if (importer == null)
|
||||
Debug.LogWarning($"Failed to load TextureImporter : {assetPath}");
|
||||
return importer;
|
||||
}
|
||||
|
||||
public static TextureImporterPlatformSettings GetPlatformPCSettings(TextureImporter importer)
|
||||
{
|
||||
TextureImporterPlatformSettings platformSetting = importer.GetPlatformTextureSettings("Standalone");
|
||||
return platformSetting;
|
||||
}
|
||||
public static TextureImporterPlatformSettings GetPlatformIOSSettings(TextureImporter importer)
|
||||
{
|
||||
TextureImporterPlatformSettings platformSetting = importer.GetPlatformTextureSettings("iPhone");
|
||||
return platformSetting;
|
||||
}
|
||||
public static TextureImporterPlatformSettings GetPlatformAndroidSettings(TextureImporter importer)
|
||||
{
|
||||
TextureImporterPlatformSettings platformSetting = importer.GetPlatformTextureSettings("Android");
|
||||
return platformSetting;
|
||||
}
|
||||
|
||||
public static TextureImporterFormat GetPlatformPCFormat(TextureImporter importer)
|
||||
{
|
||||
TextureImporterPlatformSettings platformSetting = GetPlatformPCSettings(importer);
|
||||
var format = platformSetting.format;
|
||||
if (format.ToString().StartsWith("Automatic"))
|
||||
format = importer.GetAutomaticFormat("Standalone");
|
||||
return format;
|
||||
}
|
||||
public static TextureImporterFormat GetPlatformIOSFormat(TextureImporter importer)
|
||||
{
|
||||
TextureImporterPlatformSettings platformSetting = GetPlatformIOSSettings(importer);
|
||||
var format = platformSetting.format;
|
||||
if (format.ToString().StartsWith("Automatic"))
|
||||
format = importer.GetAutomaticFormat("iPhone");
|
||||
return format;
|
||||
}
|
||||
public static TextureImporterFormat GetPlatformAndroidFormat(TextureImporter importer)
|
||||
{
|
||||
TextureImporterPlatformSettings platformSetting = GetPlatformAndroidSettings(importer);
|
||||
var format = platformSetting.format;
|
||||
if (format.ToString().StartsWith("Automatic"))
|
||||
format = importer.GetAutomaticFormat("Android");
|
||||
return format;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 58de59cc0b28bb1468c32bfa606d999d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,23 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 84df5e62e3f1b6746a1263e076b003e1, type: 3}
|
||||
m_Name: AssetArtScannerSetting
|
||||
m_EditorClassIdentifier:
|
||||
Scanners:
|
||||
- ScannerGUID: aff1bb4d-9558-47ba-8905-77a1ad03fd29
|
||||
ScannerName: Texture Scanner
|
||||
ScannerDesc: "\u7279\u6548\u7EB9\u7406"
|
||||
ScannerSchema: 5c2e5b350351d674891ef1a046654bcf
|
||||
SaveDirectory:
|
||||
Collectors:
|
||||
- CollectPath: Assets/Samples/Space Shooter/GameRes/EffectArt
|
||||
WhiteList: []
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6b5a983fd6b713f4ea32f2f11a1b5346
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ffc063dd716495842b49933dc9a79f6e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,16 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 01b3d3fde6899514396008e1e4f6693b, type: 3}
|
||||
m_Name: EffectTextureSchema
|
||||
m_EditorClassIdentifier:
|
||||
MaxWidth: 1024
|
||||
MaxHeight: 1024
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5c2e5b350351d674891ef1a046654bcf
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue