Unreal.js

@nako_sung
What an amazing plugin!!! It would be ideal for me: thanks !

I tried to install it but I failed.
Is there a simple way? Or a step by step video, please?

@egavi ; thank you :slight_smile: I hope you all easily enjoy Unreal.js.
I updated git repo not to require git-lfs anymore, and also edited README.md for clearer instruction to install. Please check it out.

Cheers!

The examples won’t load for me either. Any solution? The content browser is just empty, no asset at all (not even meshes, materials…). Just some directories show up, but all empty.

Did you tried to get latest version? I have removed dependencies on git-lfs. :slight_smile:

The last commit seems like just a change in the README. I cloned like 20 hours ago.

If so, git-lfs removal wasn’t complete. Please follow those steps

  1. delete cloned repo. (local unreal.js directory)
  2. install git-lfs
    2-1. download git-lfs, and launch.
    2-2. type ‘git lfs install’ in command line.
  3. clone repo

I spent more than one hour before but no luck because of git-lfs.

Yesterday i tried to install it again and setup process was way more easier for me. Everything looks working and using visual studio code with typescript file. Just wondering nako_sung, would you advice to start a game with unreal.js instead of blueprint? Do you see it’s stable as that? I think most people doesn’t want to use third party scripting language just because Epic doesn’t support it and at the middle of the way, you or developers of this implementation would stop supporting.

Still, it look amazing and thanks.

@theknoppix, we(dev team in ncsoft) are currently developing our prototype fully in javascript. There were some bumps but almost every problem had been resolved, and for now I think it seems stable for production. :slight_smile: Furthermore, I hope to continue using unreal.js as a key component for shipped version of my project. :slight_smile:

BTW, V8 provides detailed profiling analysis. :slight_smile:

Thats great to hear because i thought it will be only use for prototyping and later you will convert whole code to c++ or blueprint. Thanks for your answers and support.

So still no instructions, on fool proof way to get this going? Too bad though, cause BLUI seems to achieve the same stuff - but kind of easier to get up and running.

How do you integrate Three.js into UE4 with UnrealJS?

See github: https://github.com/ncsoft/Unreal.js/blob/master/README.md

Plenty of working demos to play with.

  1. Cannot understand: How can i create simple blueprint node with this plugin or i can only modify existing?

  2. And how work “live-reloading dev env.” inside helloworld.js? What is it? What is the language syntax (=>)?

  3. How can i print text on screen (in c++ AddOnScreenDebugMessage)?

Thank you.

  1. Define a blueprint event and override it with Javascript, your call in BP will be routed into JS land.
    2-1. Monitoring source javascripts and picking up a modification event automatically.
    2-2. => is a fat arrow function which is standard javascript(ES6).
  2. You can print a log with console.log, which prints a message into log console. You can call all functions you can call within BP. SomeBlueprintFunctionLibrary.SomeStaticFunction('HelloWorld').

GWorld/*or any other UObject */.PrintString(‘Hello Javascript’, true, true, {R:1, G:1, A:1}, 1.0/seconds/)

Thank you.

  1. in helloBlueprint.js you write:

     // declare UPROPERTY's here
     // ; this.XXXXX/*[attribute+]+type*/;
     properties() {
         this.Hello/*Replicated+EditAnywhere+int*/;
         this.World/*Replicated+EditAnywhere+Actor*/;
         this.Position/*EditAnywhere+Vector]*/;
         this.Some/*EditAnywhere+DistanceDatum*/;
     }
    

how use this and where?

  1. You are planing making some youtube video tutorials?
  1. properties() function is just containing meta-data. Actually it is stringified and parsed by ‘uclass.js’, then Unreal.js reads parsed information and creates a new class.
  2. Currently I have no time for making good tutorial stuffs. :frowning: Actually I’m waiting for generous volunteers from community.

Quickly answers :smiley:

Your Javascript component working with Actor, but i have a widget which the Init (creating and add to viewport) when E key is pressed. How can i get access to this widget and override Event?

In JS, you can access any actors which are already spawned in your world. ‘GWorld.GetAllActorsOfClass(Actor)’. (FYI, current build doesn’t let you can access LevelBlueprintActor).

let actor = GWorld.GetAllActorsOfClass(YourPreciousBPActor).OutActors[0]
let widget = actor.YourPublicVarName
widget.HelloWidget()

– <extending your BP class> –

class YourNiceActor extends Blueprint.Load(‘/Game/YourBP’).GeneratedClass {
MethodToOverride(arguments…) {
console.log(‘hello JS’)
this.AnotherMethod()
}
}

/* kinda ugly for now */
let YourNiceActor_C = require(‘uclass’)()(global,YourNiceActor)
… <please refer to .js> …

I try it. Thank you!

Thank you very much, I will take a look - but I feel like a complete noob. I’ll share my progress here,…

I just updated a new example and video: Unreal.js - simple snippet editor (UnrealEngine4) - YouTube Snippet editor written in UMG.

SnippetScreenshot.jpg