cinetec_tech Posted January 19, 2015 Posted January 19, 2015 hi : in the editor_nodes.h script . around 1620 line update_nodes(); select_nodes(clone,1); if(n != NULL) select_node(n,1); else select_node(new_node,1); engine.editor.needReload(); why it's engine.editor.needReload() instead of engine.editor.reload ()? in our case, we need need_reload in our update loop to detect the nodes changes: like clone, delete, add ...etc. but with engine.editor.needReload() we couln't detect the need_reload =1 so our update code won't be called.
unclebob Posted January 20, 2015 Posted January 20, 2015 Hello, Different editor subsystems may reset need_reload flag, so another way you can go is to call engine.editor.getNumNodes every frame and check if node count was changed, then apply custom logic after that.
cinetec_tech Posted January 20, 2015 Author Posted January 20, 2015 thanks Bob! we will use your suggestion. hope in the future unigine could improve the editor callback to dectect scene change.
Recommended Posts