Jump to content

[SOLVED] [2.0] need_reload() issue


photo

Recommended Posts

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.

 

Link to comment

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.

Link to comment
×
×
  • Create New...