优化Framework.UI新增便捷接口

This commit is contained in:
janing
2025-12-14 23:35:54 +08:00
parent d530b48e34
commit 1d91daa726
5 changed files with 285 additions and 1742 deletions

View File

@@ -82,12 +82,14 @@ export class UIMgr {
}
console.log(`[UIMgr] 开始加载UI: ${className} (${url})`);
const args = url.split('://')
const bundleName = args[0];
const resourcePath = args[1];
// 通过ResMgr加载预制体
try {
const prefab = await ResMgr.getInstance().load<Prefab>(
'resources',
url,
bundleName,
resourcePath,
Prefab
);