【Bug】资源加载

iOS_release
zhangaotian 2024-08-20 14:37:30 +08:00
parent fb854093a5
commit c9a5a072a0
2 changed files with 8 additions and 10 deletions

View File

@ -1316,7 +1316,7 @@ Transform:
m_GameObject: {fileID: 274027926}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.068, y: 0.116, z: 0}
m_LocalPosition: {x: -0.068, y: 0.075, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -6365,7 +6365,7 @@ Transform:
m_GameObject: {fileID: 1505741850}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalPosition: {x: 0, y: -0.021, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:

View File

@ -269,7 +269,7 @@ namespace Framework.Manager
}
var buildData = await JsonHelper.LoadFromAddressable<BuildData>(buildConfig.BuildData);
await Init(buildData, true);
await Addressables.LoadSceneAsync(buildConfig.Path).ToUniTask();
_userBuildInfo.CurBuildId = buildConfigId;
@ -502,12 +502,12 @@ namespace Framework.Manager
{
try
{
var bluePath = string.Format(Constants.PathConstants.BuildBlueprint, _curBuildData.buildID);
var bluePath = string.Format(PathConstants.BuildBlueprint, _curBuildData.buildID);
AssetManager.Instance.Unload(bluePath);
CurBlueprint = await AssetManager.Instance.LoadAssetAsync<Sprite>(bluePath);
var buildUIPath = string.Format(PathConstants.BuildTopUIPath, _curBuildData.buildID);
AssetManager.Instance.Unload(buildUIPath);
CurTopBuildUI = await AssetManager.Instance.LoadAssetAsync<Sprite>(buildUIPath);
_loadAssets.Add(bluePath);
_loadAssets.Add(buildUIPath);
}
catch (Exception e)
{
@ -664,10 +664,8 @@ namespace Framework.Manager
AssetManager.Instance.Unload(icon.Key);
}
foreach (var ass in _loadAssets)
{
AssetManager.Instance.Unload(ass);
}
CurBlueprint = null;
CurTopBuildUI = null;
}
}
}