Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,16 @@ private async UniTask SetUpDynamicSecret()
Debug.Log("SetUpDynamicSecret end");
}

private async UniTask LoadMetadataForAOTAssemblies()
private void LoadMetadataForAOTAssemblies()
{
var aotListHandle = YooAssets.LoadAssetAsync<TextAsset>(aotDllListFilePath);
await aotListHandle.Task;
var aotListHandle = YooAssets.LoadAssetSync<TextAsset>(aotDllListFilePath);
if (aotListHandle.Status != EOperationStatus.Succeed)
{
Debug.LogError($"Failed to load AOT DLL list: {aotListHandle.LastError}");
aotListHandle.Release();
return;
}

TextAsset aotDataAsset = aotListHandle.GetAssetObject<TextAsset>();
var aotDllList = NinoDeserializer.Deserialize<List<string>>(aotDataAsset.bytes);
aotListHandle.Release();
Expand All @@ -168,8 +174,14 @@ private async UniTask LoadMetadataForAOTAssemblies()
continue;
}

var handle = YooAssets.LoadAssetAsync<TextAsset>(aotDllName);
await handle.Task;
var handle = YooAssets.LoadAssetSync<TextAsset>(aotDllName);
if (handle.Status != EOperationStatus.Succeed)
{
Debug.LogError($"Failed to load AOT DLL {aotDllName}: {handle.LastError}");
handle.Release();
continue;
}

byte[] dllBytes = handle.GetAssetObject<TextAsset>().bytes;
var err = RuntimeApi.LoadMetadataForAOTAssembly(dllBytes, HomologousImageMode.SuperSet);
Debug.Log($"LoadMetadataForAOTAssembly:{aotDllName}. ret:{err}");
Expand Down Expand Up @@ -293,7 +305,7 @@ await Prompt.ShowDialogAsync(t.dialogTitleNotice,

// First supplement metadata
updateStatusText.text = text.loadingCode;
await LoadMetadataForAOTAssemblies();
LoadMetadataForAOTAssemblies();
// Set dynamic key
updateStatusText.text = text.decryptingResources;
await SetUpDynamicSecret();
Expand Down
Loading