Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit e8a9337

Browse files
增加标准资源的导入设置
1 parent 820494b commit e8a9337

File tree

4 files changed

+43
-7
lines changed

4 files changed

+43
-7
lines changed

‎GameFramework/Editor/AssetManagement/AssetGroupEditor.cs‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,20 +92,25 @@ private void OnMenuInit()
9292
{
9393
group = settings.CreateGroup(groupName,false,false,false,null);
9494
}
95-
BundledAssetGroupSchema bagSchema=group.GetSchema<BundledAssetGroupSchema>();
95+
96+
ContentUpdateGroupSchema cugSchema = group.GetSchema<ContentUpdateGroupSchema>();
97+
if (cugSchema == null)
98+
{
99+
cugSchema = group.AddSchema<ContentUpdateGroupSchema>();
100+
}
101+
cugSchema.StaticContent = ((int)item["UpdateRestriction"] == 1);
102+
BundledAssetGroupSchema bagSchema =group.GetSchema<BundledAssetGroupSchema>();
96103
if (bagSchema == null)
97104
{
98105
bagSchema= group.AddSchema<BundledAssetGroupSchema>();
99106
}
100107
bagSchema.BuildPath.SetVariableByName(settings, item["BuildPath"].ToString());
101108
bagSchema.LoadPath.SetVariableByName(settings, item["LoadPath"].ToString());
102-
103-
ContentUpdateGroupSchema cugSchema =group.GetSchema<ContentUpdateGroupSchema>();
104-
if (cugSchema == null)
109+
if (cugSchema.StaticContent)
105110
{
106-
cugSchema= group.AddSchema<ContentUpdateGroupSchema>();
111+
bagSchema.UseAssetBundleCrc = false;
112+
bagSchema.UseAssetBundleCrcForCachedBundles = false;
107113
}
108-
cugSchema.StaticContent = ((int)item["UpdateRestriction"]==1);
109114

110115
//Filter
111116
StringBuilder filterBuilder = new StringBuilder();
@@ -338,7 +343,6 @@ private void OnDisable()
338343
_editorForm = null;
339344
}
340345

341-
342346
private void OnGUI()
343347
{
344348
_menuItem.OnDrawLayout();
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEditor;
4+
using UnityEngine;
5+
6+
namespace Wanderer.GameFramework
7+
{
8+
public class StandardAssetPostprocessor : AssetPostprocessor
9+
{
10+
}
11+
12+
}

‎GameFramework/Editor/AssetManagement/StandardAssetPostprocessor.cs.meta‎

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎GameFramework/Runtime/Resource/AddressableVersion.cs‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ public override async void CheckUpdate(Action<bool> needUpdate)
2626
_checkHandle = Addressables.CheckForCatalogUpdates(false);
2727
_isCheckUpdate = true;
2828
await _checkHandle.Task;
29+
Log.Info($"Check Result Count:{_checkHandle.Result.Count}");
30+
foreach (var item in _checkHandle.Result)
31+
{
32+
Log.Info($"Check Result :{item}");
33+
}
34+
2935
needUpdate?.Invoke(_checkHandle.Result.Count>0);
3036
}
3137

@@ -53,6 +59,8 @@ public override async void UpdateResource(Action<float, double, double, float> c
5359
long totalDownloadSize = 0;
5460
foreach (var locator in locators)
5561
{
62+
Log.Info($"Update locator:{locator.LocatorId}");
63+
5664
var sizeHandle = Addressables.GetDownloadSizeAsync(locator.Keys);
5765
await sizeHandle.Task;
5866
long downloadSize = sizeHandle.Result;
@@ -76,6 +84,7 @@ public override async void UpdateResource(Action<float, double, double, float> c
7684
foreach (var key in locator.Keys)
7785
{
7886
downloadKeys.Add(key);
87+
//Log.Info($"locator[{locator}] size:{downloadSize} key:{key}");
7988
}
8089
}
8190
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /