DOCS

How to run a template application locally?

💡 Before starting, make sure you have Node.js installed.

Once you’ve set up your account, choose on the template application you want to begin with. In this example, we’ll use the first person character controller.

  • When the app is created, you will automatically land on the About Page. This will guide you on setting up your app.
  • Click on Explore Code on Github.
    • This will open a new tab - click on the green code button and download the zip.

💡 Make sure to unzip and extract your folder for the next step.

  • Open Visual Studio Code and then open your unzipped folder.
  • Navigate to config.js.
  • Replace the following values in config.js: (this is also indicated in the About page)
  • %YOUR_PUBLIC_TOKEN% by the public token of your application found in the "API Access" section.
  • %YOUR_MAIN_SCENE_UUID% by the UUID of the main scene generated in the Public folder of the "Asset browser" section.
  • %YOUR_CHARACTER_CONTROLLER_SCENE_UUID% by the UUID of the character controller scene generated in the Public folder of the "Asset browser" section.

💡 When entering your value in config.js, make sure to enter them between “ “

  • Once the values replaced, run the terminal in Visual Studio Code and enter npx serve.
  • Click the link - this will now run your app locally.

💡 Once running locally, you can go back to the Console Asset Browser. Double click Public Folder and then Main Scene. This will bring you to the scene editor. Any changes you make in your scene editor will show in real time in your locally run app!

Previous
Asset API