perf: 支持跳转到分享页面

This commit is contained in:
richarjiang
2026-04-06 11:04:09 +08:00
parent b732e4d8f8
commit 261c4d6878
8 changed files with 4005 additions and 7 deletions

View File

@@ -15,6 +15,9 @@ export class main extends Component {
@property({ type: Prefab, tooltip: '关卡页面预制体' })
pageLevelPrefab: Prefab | null = null;
@property({ type: Prefab, tooltip: '写关卡页面预制体' })
pageWriteLevelsPrefab: Prefab | null = null;
@property({ type: Prefab, tooltip: 'Toast 预制体' })
toastPrefab: Prefab | null = null;
@@ -50,6 +53,14 @@ export class main extends Component {
});
}
if (this.pageWriteLevelsPrefab) {
ViewManager.instance.register('PageWriteLevels', {
prefab: this.pageWriteLevelsPrefab,
cache: true,
zIndex: 2
});
}
// 初始化 Toast 管理器
if (this.toastPrefab) {
ToastManager.instance.init(this.toastPrefab, this.node);