[rooms] load Studio export dependencies (#142)

This commit is contained in:
dukedotdev
2026-10-25 17:01:42 -04:00
committed by GitHub
parent b02a646892
commit 5f34028267
3 changed files with 101 additions and 9 deletions
+7 -1
View File
@@ -962,9 +962,15 @@ function pickBakedBundle(
target: number | null
): { filename: string; hash: string | null } | null {
if (!Array.isArray(save.UnitySubAssets)) return null
const rootId = typeof save.UnityAssetId === 'string' ? save.UnityAssetId.toLowerCase() : null
const rows = save.UnitySubAssets.filter(
(item): item is { Target?: unknown; Filename?: unknown; Hash?: unknown } =>
typeof item === 'object' && item !== null
typeof item === 'object' &&
item !== null &&
(rootId === null ||
('UnityAssetId' in item &&
typeof item.UnityAssetId === 'string' &&
item.UnityAssetId.toLowerCase() === rootId))
)
const chosen =
target === null