mahasan Posted January 9, 2019 Posted January 9, 2019 I can create a node at runtime, but when I try to delete it, I encounter "Not Responding" in the slaves. if(isMaster) { if(engine.app.clearKeyState('c')) { objMeshStatic = add_editor(new ObjectMeshStatic("box.mesh")); master.createNode(objMeshStatic,1,1); } if(engine.app.clearKeyState('x')) { remove_editor(objMeshStatic); master.removeSyncNode(master.getNumSyncNodes() - 1); master.deleteNode(objMeshStatic,1); } }
alexander Posted January 9, 2019 Posted January 9, 2019 Hi Mahasan, You need to send "delete" message before destroying the node from the memory: if(engine.app.clearKeyState('x')) { // send to all slaves master.deleteNode(objMeshStatic,1); // removeSyncNode() calls automatically inside this // free memory remove_editor(objMeshStatic); } Best regards, Alexander
mahasan Posted January 12, 2019 Author Posted January 12, 2019 not work again my c++ code if (syncker_manager->isMasterInitialized()) { if (Unigine::App::get()->clearKeyState('h')) { ref = NodeReference::create("Cuboid.node"); Editor::get()->addNode(ref->getNode()); ref->release(); syncker_master->createNode(ref->getNode(), 1, 1); } if (Unigine::App::get()->clearKeyState('c')) { syncker_master->deleteNode(ref->getNode(),0); Editor::get()->removeNode(ref->getNode()); ref->release(); } }
mahasan Posted January 12, 2019 Author Posted January 12, 2019 never mind ... i've soleved my problem by customizing syncker dll like below in function (Slave::read_tcp_node_delete) in synckerslave.cpp class of syncker; i change this line //remove this int type = tcp_socket->readInt(); //put this one int type = (int)tcp_socket->readChar();
silent Posted January 14, 2019 Posted January 14, 2019 mahasan That should be already fixed in 2.7.3 SDK update. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Recommended Posts