install
Table Of Contents
- Source Code Installation Method
- Release Package Installation Method
- Notes
- Setup Development Environment
Source Code Installation Method
Clone the repository:
git clone https://github.com/Tencent/puerts.git
Copy the
Puerts
directory frompuerts/unreal
to your project'sPlugins
directory.Install an appropriate script backend following the guide below.
Enjoy the functionality of Puerts!
Installing An Appropriate Script Backend
When it comes to selecting a JavaScript backend, its important to identify whats appropriate for your requirements.
- V8: Provides a clean ECMAScript implementation.
- Nodejs: Supports more npm modules than the V8 version but results in a larger package size.
- Quickjs: Suitable for scenarios with strict package size requirements.
V8 Backend
Download V8:
- For UE4.25 and above (e.g UE5.5), choose one: 8.4.371.19, 9.4.146.24, 10.6.194, 11.8.172
- For UE4.24 and below: V8 for UE 4.24 or below
Extract the downloaded V8 backend folder into
YourProject/Plugins/Puerts/ThirdParty
.Change the
UseV8Version
setting inPuerts/Source/JsEnv/JsEnv.build.cs
according to the version you downloaded.
NodeJS Backend (Recommended)
Download NodeJS backend from the latest Unreal Engine release. Nodejs Download
Copy the "nodejs" folder from the downloaded release
puerts_nodejs/Puerts/ThirdParty/nodejs_xx
into the puerts inside of your projectYourProject/Plugins/Puerts/ThirdParty
.Change the boolean
UseNodeJs
setting inPuerts/Source/JsEnv/JsEnv.build.cs
totrue
.
QuickJS Backend
Download QuickJS backend from the latest Unreal Engine release. QuickJS Download
Copy the "quickjs" folder from the downloaded release
puerts_quickjs/Puerts/ThirdParty/quickjs
into the puerts inside of your projectYourProject/Plugins/Puerts/ThirdParty
.Change the boolean
UseQuickJs
setting inPuerts/Source/JsEnv/JsEnv.build.cs
totrue
.
Release Package Installation Method
Navigate to the releases page and download the version that matches your UE version.
Extract the downloaded
puerts
folder into your projectYourProject/Plugins/
.Enjoy the functionality of Puerts!
Note: The releases page also includes packages for Unity. Unreal Engine versions will start with "Unreal_vx.x.x".
Notes
Mac Users: If you encounter the "Move to Trash" issue, execute the following commands:
cd Plugins/Puerts/ThirdParty
find . -name "*.dylib" | xargs sudo xattr -r -d com.apple.quarantineBlueprint-Only Projects: If you see the error "Plugin 'Puerts' failed to load because module 'JsEnv' could not be found,” it’s because pure Blueprint projects do not automatically compile plugins. Since Puerts includes C++ source code, you need to convert your Blueprint project to a C++ project by adding a C++ class. Alternatively, you can compile the UE engine with Puerts included during the compilation.
Setup Development Environment
Once puerts has been successfully installed, it's time to set up a working TypeScript development environment.