游戏热更新插件

This commit is contained in:
andrewlu
2021-02-02 00:11:00 +08:00
parent ba874af797
commit 3106b54566
40 changed files with 34326 additions and 37 deletions

View File

@@ -0,0 +1,18 @@
const {ccclass, property} = cc._decorator;
@ccclass
export default class Helloworld extends cc.Component {
onOpenBundle() {
cc.assetManager.loadBundle("Bundle2", (err, bundle) => {
if (err) {
console.error("ERROR", err);
return;
}
bundle.load<cc.Prefab>("UI2", cc.Prefab, (err2, ui2) => {
const ui = cc.instantiate(ui2);
this.node.addChild(ui);
});
});
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.8",
"uuid": "e1b90feb-a217-4493-849d-9a611900d683",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}