How to add a menu button like an image?
In Creator 3D , extending assets panel menu , you can follow below operation:
-
Create one Extension:Editor Menu ‘Extension’ > ‘Create extension’
doc url Create Extension -
Extension package.json , ‘contributions’ attribute add one configuration:
"assets": "./contributions-assets.js", -
In ‘contributions-assets.js’ exports ‘Menu’ which Assets panel would recognize it
module.exports = { Menu: [ { label: 'Create Asset', path: "create", // recent assets panel only opend this area to extends message: "create-asset", }, ], }; -
‘message: “create-asset”’ you can write it in panel.js or browser.js
More detail you can reference this demo extend create asset.zip (3.4 KB) -
More Extension System introduce document, includes extend Assets panel ,will release with Cocos Create v3.0 in the next two months.
thank you!
你好,最近又收到一些对 assets 面板右击菜单的扩展需求,包括增加扩展位置,对不同资源类型节点显示不同的菜单数量和菜单状态,扩展机制有进一步调整,上述 demo 已不再适用,请等待 v3.0 正式版的 assets 扩展说明和文档。 有问题也可直接在这里回复。
Hello, recently I have received some extension requirements for assets panel right click menu, including adding extension location, displaying different menu number and menu status for different resource type nodes, the extension mechanism has been further adjusted, the above demo is no longer applicable, please wait for the official Version of V3.0 assets extension description and documentation.Have a question also can reply directly here.
