Commonly used IPC messages
Built in broadcast message
Editor in the implementation of some tasks, will send some messages.
File System
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
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
Compile
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.
Built-in plug-in Panel monitor messages
scene:new-scene
Open a new scene in the editor.
Editor.Ipc.sendToPanel('scene', 'scene:new-scene');
scene:play-on-device
Preview of the currently selected device.
Editor.Ipc.sendToPanel('scene', 'scene:play-on-device');
scene:query-hierarchy
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
});
scene:query-nodes-by-comp-name
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
});
scene:query-node
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);
});
scene:query-node-info
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
});
scene:query-node-functions
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
});
scene:query-animation-node
Query animation root node.
Editor.Ipc.sendToPanel('scene', 'scene:query-animation-node', '9608cbWFmVIM7m6hasLXYV7', (error, dump) => {
if (error) {
return Editor.error(error);
}
// dump
});