Skip to content

Commit 353c8a1

Browse files
committed
feat(asset-bundle): add "get ab progress info" logic
1 parent 9067e17 commit 353c8a1

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

src/asset_bundle/AssetBundleUsageTest.re

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,10 @@ let goToNextScene = (wabRelativePath, sabRelativePath, needRewriteAPI) => {
141141
OperateSABAssetBundleMainService.isLoaded(sabRelativePath, state) ?
142142
AssembleABSystem.SAB.assemble(
143143
sabRelativePath,
144-
OperateSABAssetBundleMainService.unsafeGetLoadedSAB(sabRelativePath, state),
144+
OperateSABAssetBundleMainService.unsafeGetLoadedSAB(
145+
sabRelativePath,
146+
state,
147+
),
145148
OperateWABAssetBundleMainService.unsafeGetWholeDependencyRelationMap(
146149
wabRelativePath,
147150
state,
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
module RAB = {
2+
let getAllDependencyRABCount = (abRelativePath, wabRelativePath, state) =>
3+
FindDependencyDataSystem.findAllDependencyRAbRelativePath(
4+
abRelativePath,
5+
OperateWABAssetBundleMainService.unsafeGetWholeDependencyRelationMap(
6+
wabRelativePath,
7+
state,
8+
),
9+
)
10+
|> Js.Array.length;
11+
12+
let getLoadedDependencyRABCount = (abRelativePath, wabRelativePath, state) =>
13+
FindDependencyDataSystem.findAllDependencyRAbRelativePath(
14+
abRelativePath,
15+
OperateWABAssetBundleMainService.unsafeGetWholeDependencyRelationMap(
16+
wabRelativePath,
17+
state,
18+
),
19+
)
20+
|> Js.Array.filter(rabRelativePath =>
21+
OperateRABAssetBundleMainService.isAssembled(rabRelativePath, state)
22+
)
23+
|> Js.Array.length;
24+
};

0 commit comments

Comments
 (0)