It did indeed help me. Thanks. I’m getting the same issue with console.log. Also, for anyone else who might close the editor because it hangs at 45%…those are all the shaders compiling, like all ~4,000 of them. Just let it do its thing. Maybe most of those shaders should be stripped to make it easier to load. I thought it was a problem with Unreal.js.
Just installed 4.18 from marketplace to engine. Anything I type in the javascript console gets doubled, making it a waste of time trying to debug anything.
For example if I type “2+2” in the console, it prints “2+22+2” and outputs 44. If I type 2, it prints and outputs 22. Any ideas why this is happening?
I’d like to use XMLHttpRequest with UnrealJS and i get an error. I know i can use http module instead, but i want to work with ThreeJS.
→ Cannot read property ‘XMLHttpRequest’ of undefined
I try with “var XMLHttpRequest = require(“xmlhttprequest”).XMLHttpRequest;” but same error…
Hi, very impressed with the Plugin. Wondering if it can handshake with other java script frameworks, specifically tensorflow? Got errors when I tried importing the tensorflow files with javascript command " import * as tf from ‘@tensorflow/tfjs’; "
HI. I have a problem. My Game works in Editor but doesn’t after packaging. Turned out Javascript component didnt spawn my class in packaged version of the game but did in editor. Any idea how to fix this?
Hi all, new to Unreal.js … I’m trying to duplicate the quoted BP, but the “Construct Javascript Isolate” node is nowhere to be found. I’ve installed the plugin via the marketplace and using UE4 v 4.22.1.
In the end, like this example, I am trying to run some JS in a GameInstance BP. If there is a new/different way to do it, I could not find it in the forums or examples. Thanks in advance for any information.
Hello , this work of you is amazing, and thanks so much for it. I know it from years but I haven’t used yet as I would like to, hopefully soon. There are countless libraries and applications I can’t clearly think of for this.
Also, did I read correctly that every JavascriptComponent will use its own V8 instance? If so, what is the preferred workflow when running JS scripts on many in-game objects? All of the tutorials I could find are using JavascriptComponents, is there some other way to call scripts at runtime? Or would you just have a single JavascriptComponent on some globally-accessible object like the GameMode and keep all of your JS functionality there?
Is it possible to reference a JS-created class from BP? That is, if I create a class in JS that extends a Blueprint, can I spawn new instances of that class from BP somehow, or get a class ref so that I could use Get All Actors of Class BP node on it?
I noticed a BP node called “Resolve Class” but don’t know what it does…
Did you ever figure this out? Having the same problem…
[Edit] Using the “Construct Object from Class” node and choosing Javascript Isolate as the class gives the error “Cannot construct objects of type '/Script/V8.JavascriptIsolate”
Hello, I’m using this on 4.26.1 - everything works like its supposed to and I’ve successfully built and packaged and can run locally. My question is, When adding or defining a Javascript Component on an actor, is it possible to define the script source file as an external (web based) .js file. I’d like to point that source to a web server and be able to call to that .js file so that I can update it dynamically. I don’t see any other way to set that other than the Details panel in the editor. In the blueprint editor, I see that you can get the File source but not Set it.
@anonymous_user_089fe201 Is there some documentation or reference that shows how to properly define a C++ class with functions that can be accessible in JS? Also is there a reference for how to just call/create a JS function, not run using main()? I want to pass my custom Struct through and have C++ trigger the run of a determined JS function, but there isn’t clear documentation for how to create a FJavascriptFunction object and how to give it the JS script for that.