Announcement

Collapse
No announcement yet.

Unreal.js

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    And now there is no way to store the context in a variable. Could you expose UJavascriptContext to Blueprint? And I don't see a reason to not expose JavascriptContext in UJavascriptComponent.

    Comment


      Originally posted by Banbury View Post
      And now there is no way to store the context in a variable. Could you expose UJavascriptContext to Blueprint? And I don't see a reason to not expose JavascriptContext in UJavascriptComponent.
      JavascriptComponent has link to JavascriptContext in its outer, so you can retrieve JavascriptContext by calling GetOuter of JavascriptComponent.

      Comment


        CallJS looks like a great addition!

        Any chance you update the plugin on marketplace soon, so both this and "RunScript crash" fix appear in official build too, not only in Github HEAD version?

        Comment


          greate work!!!
          But if I want use it in the work .
          iOS will be support in the future ?

          Comment


            I guess now, when UE 4.15 is out and plugin is not compatible anymore, the update is imminent =)

            Comment


              I just have updated to support 4.15. (https://github.com/ncsoft/Unreal.js-core)

              Comment


                Great! Thanks, nako_sung. Is it coming to marketplace, or you're too busy and we should just build it from source from now on?

                Comment


                  I'm quite busy now. But next week I'll be on a trip to GDC so I think there can be enough time to submit a build in a hotel room.

                  Comment


                    No pressure, and thanks =) Building from source is perfectly fine, it's just a question of convenience for plugin users. Marketplace and auto-updates made programmers lazy :P

                    Comment


                      Is there a way to create a custom c++ class and have it call javascript functions. Is there a way to call custom methods inside the c++ class from javascript?

                      Comment


                        [MENTION=639866]codeman.pn.nz[/MENTION] You can call all functions declared as UFUNCTION. (Reflection)

                        Comment


                          Originally posted by nako_sung View Post
                          [MENTION=639866]codeman.pn.nz[/MENTION] You can call all functions declared as UFUNCTION. (Reflection)
                          Thanks for the quick response. So how could I call a static javascript function from c++? How can I pass a reference to an object to javascript and have it call a method in javascript?

                          Comment


                            [MENTION=639866]codeman.pn.nz[/MENTION] There are several example projects available on https://github.com/ncsoft/Unreal.js-demo. You can expose some WKO's(well-known-objects are accessed with global var names) and you can keep your JS functions as unreal engine's delegates to call back later.

                            Comment


                              Trying to return a variable to a blueprint from the javascript code

                              Hey There! Thanks for this plugin, its great! currently using it as part of my University Dissertation project

                              I've been trying to figure out how I can return a variable from JS to a blueprint. I can call the function fine but i cant get the variable to be passed back :S
                              I found the page on UPROPERTY on the wiki but even with the flags the value will not be passed back for osme reason, I've never used this flags before so Im sorry in advanced if this is such a rookie mistake

                              Code:
                                      GetServerID(_posX/*int*/ , _posY/*int*/ , $/*return+int*/ ) {
                                          console.log(GetServID(_posX, _posY));                      //Prints correctly
                                          console.log(typeof _posX);                                      //Prints correctly
                                          return _serverGrid[_posY][_posX].id/*return+int*/ ;   //Returns 0 always, even with hard-coded value
                                      }
                              Im using the plugin from the marketplace with version 4.14.3 of UE4.

                              Any help or hints is greatly appreciated!
                              Last edited by wavekid; 04-15-2017, 12:55 PM.

                              Comment


                                You can declare a parent BP with function having proper signature and override that function with your JS class. Or you may leave return value to some member variable, so BP can read from it.

                                Good luck!

                                Comment

                                Working...
                                X