Skip to content
Unreal.js: Javascript runtime built for UnrealEngine 4
Branch: master
Clone or download
This branch is 58 commits behind ncsoft:master.

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Examples
doc/images
.gitattributes
.gitignore
.gitmodules
LICENSE
README.md

README.md

star this repo fork this repo

Unreal.js

Unreal.js is a plug-in which brings V8-powered Javascript into UnrealEngine4.

Features

  • Powered by latest V8 (ES6, 5.1.300)

  • CommonJS modules

  • Full access to the whole UnrealEngine API

  • Free to subclass existing classes including blueprint

  • Live reload

  • Communicate with outer world: REST(http), websocket, process(pipe), arraybuffer, ...

  • Bridge API for editor extension

  • Auto-completion for Visual Studio Code (auto-generated *.d.ts)

  • Debugging within Visual Studio, Visual Studio Code, WebStorm and all IDE which supports V8 protocol

  • Profiling supported by V8

  • Dedicated Javascript console on UnrealEditor

  • (Full) access to existing javascript libraries via npm, bower, ...

Dummy demo

Tutorials & documentation

License

  • Licensed under the MIT license
  • see LICENSE for details

Examples

2048

Springy

Editor extension

Create a new actor

let myActor = new Actor(GWorld,{X:10,Y:20,Z:30});
myActor.SetActorLocation({X:40,Y:80,Z:120});

Subclass an existing class

class MyActor extends Actor {
  properties() {
    this.MyProp/*EditAnywhere+Replicated+int*/;
  }
  RPC(x/*int*/) /*Server+Reliable*/ {
    console.log('This function is replicated',this.MyProp++);
  }
}
let MyActor_C = require('uclass')()(global,MyActor);
if (GWorld.IsServer()) { 
  new MyActor_C(GWorld);
}

Node.js like

let _ = require('lodash');
let kick = () => {
  console.log("Hello timer!",_.keys(this));
  setTimeout(kick,1000);
};
kick();
You can’t perform that action at this time.