doc/unreal/en/demos.md
Bellow is a list of demo projects that cover all of the different features Puerts has to offer.
Download one of the demo projects below
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.
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.
You can manually construct one or more virtual machines.
GameInstance (you can also create it in other classes as needed).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.
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.
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:
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.