I apologize if this is something obvious I missed, but I can’t find out how to make c++ functions callable from javascript.
I tried using EMSCRIPTEN_KEEPALIVE as I can’t pass command line arguments to emscripten without recompiling the engine, but <emscripten.h> can’t be found when included and cheating by adding
However I don’t think it’s good practice to change the engine whenever a new function needs to be visible from js.
I could edit the engine further to make exported functions a setting, but I can’t help but feel I’ve missed something easier. For one, I haven’t been able to include the emscripten headers used by the engine, they are not found even after setting include path in Visual Studio, and have thus been unable to use its macro’s. I’ll try some more things and report back, in the meantime any help is duly appreciated.
Just a quick question, are you trying to access the emscripten generated code outside of the project, in your html5/js app or are you using this inside the project?
Ah, well in that case, my company creates product configuration and visualisation software. We were interested to see if we could use UE4 to improve graphics quality. To support legacy client catalogs and applications it was necessary to call certain functions from js.