puerts is a TypeScript programming solution within game engines.
-
provides a JavaScript run-time
-
allows TypeScript to access the host engine(module-binding on the JavaScript level and generating TypeScript declarations)
-
Facililates game building processes by combining JavaScript packages and toolchains with the rendering power of professional game engines
-
In contrast to lua script, TypeScript supports static type checking, which significantly improves code robustness and maintainability.
-
High efficiency: supports reflection binding throughout the platform (engine) - no extra steps (code generation) needes for development.
-
High performance:supports static binding throughout the platform (engine) - takes care of complex scenes
-
git clone https://github.com/Tencent/puerts.git
-
Copying the plugin to your project
-
unreal engine
- copy
Puerts
underpuerts/unreal
to your project'sPlugins
folder - please refer to unreal demo
- copy
-
unity
-
copy all contents under
puerts/unity/Assets
to your project'sAssets
folder - please refer to unity demo -
Plugins needs to be either downloaded from releases or complied by yourself.
-
-
Unity
import {UnityEngine} from 'csharp'
UnityEngine.Debug.Log('hello world');
let gameObject = new UnityEngine.GameObject("testobject");
console.log(gameObject.name);
gameObject.transform.position = new UnityEngine.Vector3(1, 2, 3);
Unreal
import * as UE from 'ue'
import {argv} from 'puerts';
let world = argv.getByName("World") as UE.World;
let actor = world.SpawnActor(UE.MainActor.StaticClass(),
undefined, UE.ESpawnActorCollisionHandlingMethod.Undefined, undefined, undefined) as UE.MainActor;
console.log(actor.GetName());
console.log(actor.K2_GetActorLocation().ToString());
-
unreal engine 4.22 ~ latest version
-
unity 5 ~ latest version
-
iOS,Android,Windows,Macos
-
any .net environment
QQ group:942696334
UE4-only QQ group:689643903