Is there a method to listen to the creation of nodes?
Hello @619944680,
The callback subtreeLoaded is triggered when loading a model AND when a node is created.
Thanks,
Tino
1 Like
But when I use createMeshInstance to create a node. The callback subtreeLoaded did not return nodeId.
Hello @619944680,
Let’s try this code snippet:
hwv.setCallbacks({
subtreeLoaded: function(callbackNodeId, source) {
console.log("node id: " + callbackNodeId + "; source: " + Communicator.NodeSource[source]);
}
});
The above code will return the newly created node id as well as indicate the NodeSource.
Thanks,
Tino