Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Project won't compile emscripten code

I've been brought onto a project with some specific goals: it is a game to be packaged for HTML5 deployment and the game needs to be able to talk to the chrome API for certain calls (Specifically, for the webkitSpeechRecognition object). In my original investigation on how to do this, it looked like emscripten was capable of the task (link here).

The project is a blueprints project, and so my thought was to make a set of functions in c++ that make the required calls to chrome and then call those from blueprints. However, even though the UE4 project apparently packages with emscripten, it won't let me compile the c++ code in the project because it doesn't "recognize" the emscripten macros.

Since it can't compile, I can't make the blueprints side recognize the function that I've written.

Is there:

  • Any way to make unreal compile my emscripten code?

  • Any way to compile without the unreal engine? (I tried compiling from the emscripten terminal and it couldn't find engine.h)

  • Any other way to call javascript from inside the game?

I will be greatly appreciative to anyone who can help with this. I can't be the only one who's trying to do this. Thanks!

Product Version: UE 4.9
more ▼

asked Mar 26 '16 at 06:49 PM in C++ Programming

avatar image

11 1 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

It's a bit late but I stumbled across this question this post while trying to solve a similar problem so I thought I'd share my solution: https://forums.unrealengine.com/showthread.php?119332-js-c-communication&p=576340#post576340

Only tested it with UE 4.12

more ▼

answered Aug 08 '16 at 11:51 AM

avatar image

1 1

avatar image generallyjansen Aug 08 '16 at 01:31 PM

Wow this looks really promising! Thanks for going out of your way to find my post. I'll definitely give this a shot.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question