gitmyhub

Unreal.js

★ 3.8k updated 2y ago

Unreal.js: Javascript runtime built for UnrealEngine

Unreal.js is an Unreal Engine plugin that lets you write game logic and editor tools in JavaScript using the V8 engine, with full access to the Unreal Engine API and support for npm packages.

JavaScriptTypeScriptC++V8Unreal Enginenpmsetup: hardcomplexity 4/5

Unreal.js is a plugin for Unreal Engine, the game development platform used to build many commercial games and real-time 3D applications. The plugin adds JavaScript scripting directly inside Unreal Engine, so developers can write game logic, extend the editor, and interact with the engine using JavaScript instead of or alongside the usual C++ and Blueprint visual scripting tools.

The JavaScript environment is powered by V8, the same engine that runs JavaScript in Chrome and Node.js. This means the plugin supports modern JavaScript syntax and allows you to import and use packages from npm, the standard JavaScript package registry. It also supports CommonJS-style modules, so code can be organized the way JavaScript developers are already accustomed to.

From within a JavaScript script, you get access to the full Unreal Engine API: you can create actors in the game world, move them around, subclass existing engine classes, define replicated properties for multiplayer, and extend the Unreal Editor itself with custom panels and tools. The plugin includes a JavaScript console inside the editor for quick testing. Live reload is supported, so changes to scripts take effect without restarting the engine.

Debugging works through the V8 protocol, which means you can use Visual Studio, Visual Studio Code, WebStorm, or any compatible IDE to set breakpoints and step through JavaScript running inside Unreal Engine. Auto-completion is available in Visual Studio Code through automatically generated TypeScript definition files.

The plugin is available through the Unreal Engine Marketplace for versions 4.11 through 4.27 and 5.0 to 5.1. It can also be installed manually by cloning the core repository into a project's Plugins folder. A demo project and several example scripts are provided to help get started. The code is released under the BSD 3-Clause license.

Where it fits