Skip to content

Commit 75e90ba

Browse files
committed
✨ 更新
1 parent 52c590e commit 75e90ba

File tree

8 files changed

+35
-18
lines changed

8 files changed

+35
-18
lines changed

Editor/Data/AssetBuildConfig.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ namespace AIO.UEditor
1111
[Serializable]
1212
[Description("资源打包配置")]
1313
[HelpURL("https://github.com/AIO-GAME/Unity.Asset.CLI/blob/main/.github/API_USAGE/ToolWindow.md#-%E6%89%93%E5%8C%85%E5%B7%A5%E5%85%B7-")]
14+
#if UNITY_2021_1_OR_NEWER
15+
[Icon("Packages/com.aio.cli.asset/Resources/Editor/Icon/pencils.png")]
16+
#else
17+
[ScriptIcon(IconRelative = "Packages/com.aio.cli.asset/Resources/Editor/Icon/pencils.png")]
18+
#endif
1419
public partial class AssetBuildConfig : ScriptableObject
1520
{
1621
private static AssetBuildConfig _instance;

Editor/Data/Collect/Root/AssetCollectRoot.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ namespace AIO.UEditor
1919
[Serializable]
2020
[HelpURL("https://github.com/AIO-GAME/Unity.Asset.CLI/blob/main/.github/API_USAGE/ToolWindow.md#asset-system-%E5%B7%A5%E5%85%B7%E8%AF%B4%E6%98%8E")]
2121
#if UNITY_2021_1_OR_NEWER
22-
[Icon("Packages/com.aio.package/Resources/Editor/Setting/icon_interests.png")]
22+
[Icon("Packages/com.aio.cli.asset/Resources/Editor/Icon/pencils.png")]
2323
#else
24-
[ScriptIcon(IconRelative = "Packages/com.aio.package/Resources/Editor/Setting/icon_interests.png")]
24+
[ScriptIcon(IconRelative = "Packages/com.aio.cli.asset/Resources/Editor/Icon/pencils.png")]
2525
#endif
2626
public partial class AssetCollectRoot : ScriptableObject
2727
{

Editor/Data/Collect/Root/AssetCollectRoot.cs.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/Windows/AssetWindow.cs.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/Windows/Inspector/AssetConfigCommonEditor.cs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,14 @@ public void OnActivation()
3131

3232
HeaderIcon = AssetPreview.GetMiniThumbnail(ASConfig);
3333
UpdateRecordQueue();
34-
PackageNames = ACConfig.GetNames() ?? Array.Empty<string>();
35-
PackageNameIndex = PackageNames.ToList().IndexOf(ABConfig.PackageName);
34+
PackageNames = ACConfig.GetNames() ?? Array.Empty<string>();
35+
if (PackageNames.Length > 0)
36+
{
37+
PackageNameIndex = PackageNames.ToList().IndexOf(ABConfig.PackageName);
38+
if (PackageNameIndex == -1) PackageNameIndex = 0;
39+
ABConfig.PackageName = PackageNames[PackageNameIndex];
40+
}
41+
else PackageNameIndex = -1;
3642
}
3743

3844
public void OnGUI()
@@ -467,8 +473,8 @@ private void OnGUIRemote()
467473
AssetSystem.SequenceRecordQueue.GET_REMOTE_PATH(ASConfig));
468474

469475
if (GELayout.Button("Upload FTP", GSValue))
470-
AHandle.FTP.Create("", "", "")
471-
.UploadFile(
476+
AHandle.FTP.Create("", "", "").
477+
UploadFile(
472478
AssetSystem.SequenceRecordQueue.LOCAL_PATH);
473479
}
474480
}
@@ -576,4 +582,4 @@ private void Update()
576582

577583
#endregion
578584
}
579-
}
585+
}

Extensions/YooAsset.CLI/Runtime/1.5.7/Handle/Load.Asset.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,21 @@ protected override IEnumerator CreateCoroutine()
7979

8080
private TaskAwaiter<TObject> AwaiterGeneric;
8181

82+
private AssetOperationHandle Operation;
83+
8284
private async Task<TObject> GetTask()
8385
{
84-
var operation = Instance.HandleGet<AssetOperationHandle>(Address);
85-
if (operation is null)
86+
Operation = Instance.HandleGet<AssetOperationHandle>(Address);
87+
if (Operation is null)
8688
{
8789
var package = await Instance.AutoGetPackageTask(Address);
8890
if (package is null) return null;
89-
operation = package.LoadAssetAsync(Address, AssetType);
90-
if (!await operation.CheckTask()) return null;
91-
Instance.HandleAdd(Address, operation);
91+
Operation = package.LoadAssetAsync(Address, AssetType);
92+
if (!await Operation.CheckTask()) return null;
93+
Instance.HandleAdd(Address, Operation);
9294
}
9395

94-
return operation?.GetAssetObject<TObject>();
96+
return Operation?.GetAssetObject<TObject>();
9597
}
9698

9799
protected override TaskAwaiter<TObject> CreateAsync()
@@ -105,8 +107,7 @@ protected override TaskAwaiter<TObject> CreateAsync()
105107
}
106108

107109
/// <inheritdoc />
108-
public override ILoaderHandle<TObject> LoadAssetAsync<TObject>(string location, Type type, Action<TObject> completed = null) =>
109-
new LoadAsset<TObject>(location, type, completed);
110+
public override ILoaderHandle<TObject> LoadAssetAsync<TObject>(string location, Type type, Action<TObject> completed = null) => new LoadAsset<TObject>(location, type, completed);
110111
}
111112
}
112113

Runtime/Config/ASConfig.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ namespace AIO.UEngine
1515
{
1616
[Description("资源系统配置"), Serializable]
1717
[HelpURL("https://github.com/AIO-GAME/Unity.Asset.CLI/blob/main/.github/API_USAGE/Config.md#-aiouengineasconfig---%E8%B5%84%E6%BA%90%E7%B3%BB%E7%BB%9F%E9%85%8D%E7%BD%AE-")]
18+
#if UNITY_2021_1_OR_NEWER
19+
[Icon("Packages/com.aio.cli.asset/Resources/Editor/Icon/pencils.png")]
20+
#else
21+
[ScriptIcon(IconRelative = "Packages/com.aio.cli.asset/Resources/Editor/Icon/pencils.png")]
22+
#endif
1823
public class ASConfig : ScriptableObject<ASConfig>
1924
{
2025
/// <summary>

Runtime/Config/ASConfig.cs.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)