GitXplorerGitXplorer
T

puerts

public
5177 stars
719 forks
252 issues

Commits

List of commits on branch master.
Verified
2213c812c0179cf9c5ddf1e0729f52f34a3fe10e

[unreal]对于原生cpp绑定,若未绑定构造函数,则在ts声明中加入abstract标记,可以在ts中尝试构造时提示报错 (#1971)

mmorirain committed 3 days ago
Unverified
0dc4b6d602318957a4fa8835fafa0a1df7e1c2f3

[unity]Class::FromGenericParameter在debug下触发断言,疑似这api因为笔误导致的bug,通过复制过来更改的方式解决

cchexiongsheng committed 3 days ago
Unverified
bd464bbfb45ce77a46187f70e20b4770fc613047

[unity]LoadExtensionMethodInfo只需调用一次

cchexiongsheng committed 3 days ago
Unverified
7bb4273b46db737e3b472af3f11fbdd6ee603cc8

[unity]ExtensionAttribute的初始化也统一放到InitialPuerts

cchexiongsheng committed 5 days ago
Verified
33cdf6f0183bfad337bfc4780847d0e063a3fb69

[unity]将il2cpp版本的注册逻辑从C#改为C++ (#1967)

cchexiongsheng committed 5 days ago
Unverified
a81236988f5cef92e9e64168e4dce0c8d1010066

[unreal]加一个蓝图名字空间声明的接口

cchexiongsheng committed 10 days ago

README

The README file for this repository.

Logo

license PRs Welcome

unreal

unity Unity_Test

跳转中文

WHAT is PuerTS (PUER Typescript)?

PuerTS is a TypeScript programming solution in Unity/Unreal/DotNet.

  • provides a JavaScript Runtime.
  • allows TypeScript to access the host engine with the help of TypeScript declarations generation.

WHY should I use PuerTS?

  • Facilitates game-building processes by combining JavaScript/Node.js ecosystem and professional game engines
  • In contrast to Lua script, TypeScript supports static type checking, which significantly improves code robustness and maintainability.
  • High efficiency: supports reflection call throughout the host - no extra steps needed for interop with C++/C#.
  • High performance: supports static wrapper generation - handles complex scenes with high-performance demands.
  • Talented WebGL Support: massive advantage in performance and dev efficiency compared to Lua, even faster than pure C# in some cases.

HOW can I start to use PuerTS

Documentation


FAQ

How to Install

Changelog

Known issues


Select Script Engine

Currently puerts supports three script engines: v8, quickjs, nodejs, choose the one that suits you.

  • V8 (default): Generally excellent performance, moderate code size, only includes the implementation of the ECMAScript specification, does not include Node.js API or browser API.

  • QuickJS: Performance is not as good as V8, does not support debugging, but has a small code size, suitable for scenarios where code size is critical.

  • Node.js: Supports Node.js API (OpenSSL-related APIs are not supported on Unreal Engine's mobile platform), but has a larger code size.

Script Engine Node api Performance Code Size Debugging Notes
V8 ***** *** ✔️
QuickJS ** *
Node.js ✔️ ***** ***** ✔️ OpenSSL may be disabled

Avaliable on these Engine

  • unreal engine 4.22 ~ latest

  • unity 5 ~ latest

  • Any .net project

Available on these Platform

  • iOS
  • Android
  • OpenHarmony
  • Windows
  • Macos

Ask for help

Github Discussion


WHAT - 普洱TS是什么?

PuerTS是 Unity/Unreal/Dotnet 下的TypeScript编程解决方案

  • 提供了一个JavaScript运行时
  • 提供TypeScript声明文件生成能力,易于通过TypeScript访问宿主引擎,

WHY - 为什么我该用普洱TS?

  • JavaScript生态有众多的库和工具链,结合专业商业引擎的渲染能力,快速打造游戏
  • 相比游戏领域常用的lua脚本,TypeScript的静态类型检查有助于编写更健壮,可维护性更好的程序
  • 高效:全引擎,全平台支持反射调用,无需额外步骤即可与宿主C++/C#通信。
  • 高性能:全引擎,全平台支持生成静态调用桥梁,兼顾了高性能的场景。
  • WebGL平台下的天生优势:相比Lua脚本在WebGL版本的表现,PuerTS在性能和效率上都有极大提升,目前极限情况甚至比C#更快。

HOW - 我该怎么开始


常见问题

最新版本安装

改动日志

已知问题与解决办法


脚本引擎选择

目前puerts支持三种脚本引擎:v8、quickjs、nodejs,选择合适你的那个。

  • v8(默认):综合比较优秀,高性能,代码体积适中,仅包含ecmascript规范的实现,不包含nodejs api、浏览器 api

  • quickjs: 性能不如v8,不支持调试,但代码体积小,适用于代码段大小敏感型业务

  • nodejs:支持nodejs api(unreal engine的移动平台下不支持openssl相关api),代码体积较大

脚本引擎 Node api 性能 代码体积 调试 补充
V8 ***** *** ✔️
QuickJS ** *
Node.js ✔️ ***** ***** ✔️ OpenSSL 可能被禁用

可用引擎

  • unreal engine 4.22 ~ latest

  • unity 5 ~ latest

  • 任意.net环境

可用平台

  • iOS
  • Android
  • 鸿蒙(OpenHarmony)
  • Windows
  • Macos

技术支持

Github Discussion

QQ群:942696334

UE4专属群:689643903

开发博客

知乎专栏