x

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"

Get Web Browser

I'm new to unreal but have some experience with working in java and c# with unity.

I'm creating a HTML project and I need to access the web browser information, it very similar of getting information about the browser in JavaScript using Navigator Object. I'd prefer this to be done in c++ but blueprint will do fine.

I don't know if this is possible but if it is any help would be appreciated. I know there is some Web Browser documentation but no real good example if that is what I need to use to do this.

Product Version: Not Selected
Tags:
more ▼

asked Jul 10 '15 at 01:52 PM in Using UE4

avatar image

TheH0EY
6 1 2 5

avatar image Shadowriver Jul 10 '15 at 03:20 PM

You want to display web browser to user or get data from website without displaying website?

avatar image TheH0EY Jul 13 '15 at 08:33 AM

niether I want the game from inside a browser be it chrome or firefox to be able to access the browser so i can get input from an Oculus.

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

2 answers: sort voted first

So I figured out how to connect to the oculus and i used a cwrap function to send the orientation of the oculus to the compiled c++ script i have in my project. here is the cwrap function thats called in javascript

    Orient = Module.cwrap('orient_game', null, ['number'], ['number'], ['number'], ['number'])
    Orient(posState.orientation.y, posState.orientation.w, posState.orientation.z, posState.orientation.x);

This call function below in a character controller class

   extern "C"
   {
   #if PLATFORM_HTML5_BROWSER
       // callback from javascript. 
      void EMSCRIPTEN_KEEPALIVE orient_game(float x,float y,float z,float w)
      {
          orient=FQuat(x, y, z,w);
      }
   #endif 
   }
more ▼

answered Jul 23 '15 at 04:01 PM

avatar image

TheH0EY
6 1 2 5

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

Hi,

Can i use this the same way to talk from javascript to blueprint? I'm a javascript developer and my friend UE4 developer (mostly blueprint stuff) and we want to make a site together.

Thanks Felix

more ▼

answered Aug 25 '15 at 11:54 AM

avatar image

flieks
1 1

avatar image TheH0EY Aug 26 '15 at 08:34 AM

Yes but you would need to create a c++ class and create a child blueprint from that c++ class with separate blueprint callable functions returning the values you got from JavaScript. bear in mind function shown only returns variables from JavaScript to unreal, not unreal to JavaScript and can only return Integers, doubles and strings .

avatar image flieks Sep 01 '15 at 07:00 AM

thanks, Do you also know how to do the reverse? Call a javascript function from C++? Maybe we can json.stringify it first if json.parse exists in C++ (to get the object from a string).

(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