retejs / module-plugin

4 stars 10 forks source link

Use with engine #9

Closed TSteele27 closed 4 years ago

TSteele27 commented 4 years ago

Hello! Thank you for this project, I was wondering if you are able to use this plugin with the engine only? Currently If I try to run a module with modules in it from the editor JSON using only the engine then none of the module nodes are processed. If I have the module installed in the editor and the engine is running side by side, things work as expected. Is there something I am doing wrong on the engine side of things? The documentation is a bit fuzzy on this. Thanks again!

Ni55aN commented 4 years ago
engine.use(ModulePlugin, { engine, modules });

It works for me. There may be an exception if updateModuleSockets will be called for some reason

TSteele27 commented 4 years ago

Works like a charm. I was confused because the documentation never mentioned that the engine could also 'use' the plugins, but that makes sense. Thanks for the help!