@nako_sung, nope, as I have no JS logic except “5 > 3” passed into RunScript node (belonging to JavascriptContext). This is definitely an issue with plugin’s RunScript node and cooked builds - it makes the game crash even with empty project.
Repro steps:
- Create empty project (doesn’t matter if C++ and BP), no starter content;
- Open Level Blueprint and recreate this simple structure:
- Press “Launch” to make cooked build. When it runs, you’ll see “true” on screen as a confirmation that “5 > 3” script was evaluated;
- Close the window and you’ll get a crash.
…
I thought it could be related to wrong parenting, i.e. “Outer” node being linked to level blueprint or game instance parent, but it’s not the case. If you do the same with an actor with JavascriptComponent, it still crashes. The only modification you’d have to do is make JavascriptContext field of UJavascriptComponent blueprint-accessible to gain access to RunScript node from component:
UPROPERTY(transient, **BlueprintReadOnly**)
UJavascriptContext* JavascriptContext;
But again, you don’t have to do this and the crash is reproducible with unmodified plugin, following repro steps above.