Jump to content

Filesystem watch in play mode


photo

Recommended Posts

Hi,

 

is it possible to enable the automatic reloading of meshes (when updated in the filesystem) in play mode, not only in the editor? In addition, is it possible to change the frequency with which updates on meshes are propagated to the Engine?

 

Regards,

Florian

Link to comment
  • 3 weeks later...

Hi Florian,

 

Engine automatically updating some changed resources when editor script is loaded (see checks for engine.editor->isEnabled in sources). For using this in your app you just need to load an empty editor script:

Unigine::Editor::get()->load("empty_editor_script.cpp");

Empty editor script must implement 3 functions:

int init() {
	return 1;
}

int update() {
	return 1;
}

int shutdown() {
	return 1;
}

As for the frequency,  there is no api for this, but if you can recompile engine, check RenderManager.cpp : RENDER_MANAGER_RESOURCE_CHECK define and WorldManager file.

Link to comment
×
×
  • Create New...