Skip to main content

install

Source Code Installation Method

  1. Clone the repository:

    git clone https://github.com/Tencent/puerts.git
  2. Copy the Puerts directory from puerts/unreal to your project's Plugins directory.

  3. Install an appropriate script backend following the guide below.

  4. Enjoy the functionality of Puerts!

Now that you have the Puerts files, it's time to select an appropriate script backend.

  • 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

  1. Download V8:

  2. Extract the downloaded V8 backend folder into YourProject/Plugins/Puerts/ThirdParty.

  3. Change the UseV8Version setting in Puerts/Source/JsEnv/JsEnv.build.cs according to the version you downloaded.

  1. Download NodeJS backend from the latest Unreal Engine release. Nodejs Download

  2. Copy the "nodejs" folder from the downloaded release puerts_nodejs/Puerts/ThirdParty/nodejs_xx into the puerts inside of your project YourProject/Plugins/Puerts/ThirdParty.

  3. Change the boolean UseNodeJs setting in Puerts/Source/JsEnv/JsEnv.build.cs to true.

QuickJS Backend

  1. Download QuickJS backend from the latest Unreal Engine release. QuickJS Download

  2. Copy the "quickjs" folder from the downloaded release puerts_quickjs/Puerts/ThirdParty/quickjs into the puerts inside of your project YourProject/Plugins/Puerts/ThirdParty.

  3. Change the boolean UseQuickJs setting in Puerts/Source/JsEnv/JsEnv.build.cs to true.

Release Package Installation Method

  1. Navigate to the releases page and download the version that matches your UE version.

  2. Extract the downloaded puerts folder into your project YourProject/Plugins/.

  3. 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

  1. 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.quarantine
  2. Blueprint-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.