How do you know the node uuid in cocos creator 3d?
for script
Right click on the node, and click the Copy and Print UUID item in the popup menu, it will copy the UUID for you, also it will show the UUID in the console.
What do you want to use UUID for
I know. But I want to know UUID using script.
ex) Editor.assetdb.queryAssets(‘db://assets/**/*’, ‘texture’, function (err, results) {
results.forEach(function (result) {
// result.url
// result.path
// result.uuid
// result.type
});
}); // used cocos creator. but how cocos creator3d ?
All interaction in Creator3D is via IPC
await Editor.Ipc.requestToPackage('asset-db', 'query-asset-uuid', ‘db://assets/abc.json’);
await Editor.Ipc.requestToPackage('asset-db', 'query-assets', {
pattern: 'db://assets/cases/audio/**/*'
});
You can use it this way for now
But, these interfaces are not very stable yet and will be tweaked in the future
After the interface stabilizes, we will provide the specific interface modification scheme, and the written plug-in may need to be modified
Thank you
