Skip to main content

Official Puerts Demos?

Bellow is a list of demo projects that cover all of the different features Puerts has to offer.

Setup

  1. Download one of the demo projects below

  2. Setup the Puerts plugin inside of the demo project using the official installation guide.

Note: Installing the NodeJS script backend is recommended for all demo projects.

Projects

Legacy Projects (Potentially Outdated)

How to Run:
To run a specific TypeScript example, change the entry in TsGameInstance.cpp to the desired script name (without the .ts extension). By default, it runs QuickStart.

Manually Creating a Virtual Machine

You can manually construct one or more virtual machines.

Inheriting Engine Classes

  • FPS Demo: A first-person shooter game example demonstrating how to use Puerts' "Inherit Engine Class" feature. More details can be found in the Unreal Manual.

When this feature is enabled, the system automatically starts a default VM as the runtime environment for TypeScript classes that inherit from engine classes. Note that if you start additional VMs, they will be isolated from each other.

TypeScript and Engine/C++ Interaction Examples

Although the following examples are part of the Virtual Machine Example Project, they can be run in any VM environment.

  • QuickStart.ts: Demonstrates mutual calls between TypeScript and the Unreal Engine.

    • In TypeScript classes that inherit engine classes, calling argv.getByName("GameInstance") will return undefined because this argument isn’t passed into the default VM by default.
  • NewContainer.ts: Demonstrates container creation.

  • AsyncTest.ts: Demonstrates how to load a Blueprint asynchronously and wrap a Delay into an async/await call.

  • UsingWidget.ts: Demonstrates UI loading, event binding, and data access.

  • UsingMixin.ts: Demonstrates the mixin functionality.

  • Calling regular C++ classes:

Editor Extensions

Puerts can also be used to write editor extensions. If you use the Node.js version of Puerts, you can leverage a wide variety of npm packages to speed up editor development.