Editor in the implementation of some tasks, will send some messages.
-
asset-db:assets-created Create a new file in the project.
-
asset-db:assets-moved If a file is moved within the project folder.
-
asset-db:assets-deleted When a file is deleted.
-
asset-db:asset-changed If the file is modified.
-
asset-db:script-import-failed When an error occurs when a script is imported.
-
scene:enter-prefab-edit-mode Scene into the prefab edit state when it will send the message.
-
scene:saved When the scene is saved, it will send the message.
-
scene:reloading Scene reloading.
-
scene:ready Scene ready
-
editor:build-start Start compilation
-
editor:build-finished Compile end
-
builder:state-changed Compiler status update
-
builder:query-build-options Query build options
Note: Starting from v1.9.1, points 1 and 2 are not recommended. If necessary please refer to Custom Project Build Process.
Open a new scene in the editor.
Editor.Ipc.sendToPanel('scene', 'scene:new-scene');
Preview of the currently selected device.
Editor.Ipc.sendToPanel('scene', 'scene:play-on-device');
Query the hierarchy data in the current open scene.
Editor.Ipc.sendToPanel('scene', 'scene:query-hierarchy', (error, sceneID, hierarchy) => {
if (error)
return Editor.error(error);
// hierarchy
});
Query the node that contains the specified component in the current scene.
Editor.Ipc.sendToPanel('scene', 'scene:query-nodes-by-comp-name', 'cc.Sprite', (error, nodes) => {
if (error)
return Editor.error(error);
// nodes
});
Query the dump data of the specified node.
Editor.Ipc.sendToPanel('scene', 'scene:query-node', '9608cbWFmVIM7m6hasLXYV7', (error, dump) => {
if (error)
return Editor.error(error);
// JSON.parse(dump);
});
Query the basic information of a node.
Editor.Ipc.sendToPanel('scene', 'scene:query-node-info', '9608cbWFmVIM7m6hasLXYV7', 'cc.Node', (error, info) => {
if (error)
return Editor.error(error);
// info
});
Query the component function that can be called on a node.
Editor.Ipc.sendToPanel('scene', 'scene:query-node-functions', '9608cbWFmVIM7m6hasLXYV7', (error, functions) => {
if (error) {
return Editor.error(error);
}
// functions
});
Query animation root node.
Editor.Ipc.sendToPanel('scene', 'scene:query-animation-node', '9608cbWFmVIM7m6hasLXYV7', (error, dump) => {
if (error) {
return Editor.error(error);
}
// dump
});