Antoine.YVAN Posted February 16, 2022 Share Posted February 16, 2022 Hello ! I wanted to say first that I am really glad for this hot reload feature, it really helps our editor plugins' development. I was wondering if there is a way to access the editor's hot reload functionality in an editor plugin. My need is when a certain event occurs, I want to: Unload a plugin Do something (external to Unigine) Reload the plugin. Is it possible ? I did not find anything on the documentation (feature is quite new too so I guess that is why). Thanks, Antoine Link to comment
victor Posted February 16, 2022 Share Posted February 16, 2022 Hello, It's possible, please look at pseudo code: Unigine::Vector<Editor::PluginInfo *> plugin_infos = Editor::PluginManager::plugins(); // choose your `PluginInfo*`: Editor::PluginInfo *required_plugin_info = ..; // Unload a plugin: bool unloaded = Editor::PluginManager::unloadPlugin(required_plugin_info); // Do something // ... // Reload the plugin bool loaded = Editor::PluginManager::loadPlugin(required_plugin_info); Please, note, you are not able to unload a plugin from the same plugin. 1 1 Link to comment
Recommended Posts