Repolode
Tencent

Tencent/puerts

A scripting solution that lets Unity and Unreal Engine games be written in TypeScript/JavaScript, with Lua and Python backends for Unity.

Stars
6,236
Forks
869
Open issues
313
Last commit
6 days ago

What is it?

PuerTS is a multi-language scripting solution for Unity, Unreal Engine and .NET. Game logic can be written in TypeScript or JavaScript, so teams can use npm packages and TypeScript's static type checking alongside the engine's C# or C++ APIs. On Unity it also offers Lua and Python backends behind the same ScriptEnv API, letting a project mix languages.

The project provides several JavaScript runtimes: V8 as the default, QuickJS for smaller package size, and Node.js when Node APIs are needed. Interop is reflection-based and works across the full engine API, and static wrapper generation is available for performance-critical paths. It also generates TypeScript declarations for type-safe access to host engine APIs.

PuerTS 3.0 adds Puerts.AI for Unity, including an Editor assistant that controls the editor through natural language and an agent framework that can run inside the game runtime.

Key features

  • 01Write game logic in TypeScript or JavaScript with access to UnityEngine or Unreal APIs.
  • 02Unity supports Lua and Python backends through the same ScriptEnv API.
  • 03Choice of V8, QuickJS or Node.js JavaScript runtimes.
  • 04Reflection-based C#/C++ interop with optional static wrapper generation for performance.
  • 05Generates TypeScript declarations for host engine APIs.
  • 06Puerts.AI editor assistant and runtime agent framework for Unity.

Use cases

  • Building Unity or Unreal games with a TypeScript-based team.
  • Hot-updating game logic written in scripts instead of compiled C#.
  • Reusing npm packages inside a game project.
  • Running WebGL or mini-game builds with the QuickJS backend.

Quick start

  1. 1

    Add the Puerts Unity package (install per the Unity install guide)

  2. 2

    Create a ScriptEnv with the JavaScript/TypeScript backend and run a script

Things to know

  • Lua and Python backends are available for Unity only; Unreal supports JavaScript/TypeScript only.
  • Python backend is desktop only and does not support Android or iOS.
  • License is listed as NOASSERTION in metadata, so verify the license terms before use.

Topics

FAQ

What is puerts?
A scripting solution that lets Unity and Unreal Engine games be written in TypeScript/JavaScript, with Lua and Python backends for Unity. PuerTS is a multi-language scripting solution for Unity, Unreal Engine and .NET. Game logic can be written in TypeScript or JavaScript, so teams can use npm packages and TypeScript's static type checking alongside the engine's C# or C++ APIs. On Unity it also offers Lua and Python backends behind the same ScriptEnv API, letting a project mix languages.
Is puerts free to use? What license does it have?
puerts is open source under the Other license. Check the license terms before using it in commercial products.
Is puerts still maintained?
Actively maintained. The last commit to puerts was on Oct 15, 2026.
What can I use puerts for?
Building Unity or Unreal games with a TypeScript-based team. Hot-updating game logic written in scripts instead of compiled C#. Reusing npm packages inside a game project. Running WebGL or mini-game builds with the QuickJS backend.
How do I install puerts?
Add the Puerts Unity package (install per the Unity install guide) Create a ScriptEnv with the JavaScript/TypeScript backend and run a script
Where can I get puerts?
The source code and installation instructions are on GitHub: https://github.com/Tencent/puerts

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects