Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

入门示例-菜单 #2844

Open
ibmxiang opened this issue Jan 31, 2024 · 1 comment
Open

入门示例-菜单 #2844

ibmxiang opened this issue Jan 31, 2024 · 1 comment
Assignees

Comments

@ibmxiang
Copy link

URL : https://github.com/cocos-creator/creator-docs/blob/master/zh/editor/extension/first.md

按照教程,不能正确输出hello world ,刷新了extension,也开启了extension
代码如下:
/**

  • @en Registration method for the main process of Extension
  • @zh 为扩展的主进程的注册方法
    /
    export const methods: { [key: string]: (...any: any) => any } = {
    log(){console.log('Hello World')},
    };
    /
    *
  • @en Hooks triggered after extension loading is complete
  • @zh 扩展加载完成后触发的钩子
    */
    export function load() { }

/**

  • @en Hooks triggered after extension uninstallation is complete
  • @zh 扩展卸载完成后触发的钩子
    */
    export function unload() { }

{
"package_version": 2,
"version": "1.0.0",
"name": "testcreate",
"description": "i18n:testcreate.description",
"main": "./dist/main.js",
"devDependencies": {
"@types/node": "^16.0.1",
"typescript": "^4.3.4"
},
"author": "Cocos Creator",
"editor": ">=3.6.3",
"scripts": {
"build": "tsc -b",
"watch": "tsc -w"
},
"contributions": {
"menu": [{
"path": "Develop",
"label": "test",
"message": "log"
}],
"messages": {
"log": {
"methods": ["log"]
}
}
}
}

@MrKylinGithub
Copy link
Contributor

现在呢?兄弟你流程走通了吗?

@MrKylinGithub MrKylinGithub self-assigned this Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants