Convert structures and data sets defined in Noesis Studio to Horizon Worlds compatible typescript files.
-
Open a command prompt
powershell -c "irm bun.sh/install.ps1|iex"
-
Close and reopen your command prompt
-
Try running bun
bun- Output
Bun is a fast JavaScript runtime, package manager, bundler, and test runner. (1.3.6+d530ed993) Usage: bun [...flags] [...args] Commands: ... lots of commands ... Learn more about Bun: https://bun.com/docs Join our Discord community: https://bun.com/discord
- If
bunis not found, try editing PATH to include ~.bun\bin directory- Hit Windows key
- Search for env
- Pick "Edit the system environment variables"
- Click on "Environment Variables…" button
- In the "User Variables" section, double-click on Path to open dialog
- In Edit environment variable dialog, click "New"
- Enter
%USERPROFILE%\.bun\bin - Click OK -> OK-> OK to close out of all dialogs
-
Open a command prompt
bun install -g noesis2hzw
-
Test installation
- In a command prompt
noesis2hzw --help
- Output
- In a command prompt
Usage: noesis2ts [options] [set_name] Generate TypeScript files from Noesis project data Arguments: noesis_project_path Path to the Noesis project root directory (containing the .noesis/data folder) output_directory Path to the output directory for generated TypeScript files set_name Name of the dataset set to generate (optional, all if omitted) Options: -V, --version output the version number -v, --verbose Enable verbose logging -t, --types-only Only generate TypeScript type definitions -i, --indent-level Number of spaces for indentation (default: "2") -h, --help display help for command
-
Locate the Noesis project directory
- contains the
<project>.noesisfile, same directory as used for Asset import - e.g.
\Users\live\OneDrive\Documents\Noesis\Simple
- contains the
-
Locate the Horizon Worlds scripts directory
- Where your typescript files are located
- Most easily found by clicking on one of your .ts files in VSCode and clicking Copy Path, then removing Script.ts
- e.g.
\Users\live\AppData\LocalLow\Meta\Horizon\Worlds\10123456789012\scripts
-
Run noesis2hzw to convert Noesis Studio files to TypeScript
noesis2hzw -v <noesis-project-path> <world-script-path>- You can omit the
-vif you don't want it to print what it's doing - You can use
-tto just make the NoesisTypes.ts file and no data sets - You can use
-i <num>to control the indentation level (default is 2 spaces) - You can specify an optional
<set-name>at the end to limit to one data set