Back to Templates
HTTP Request (Web Request) Demo

HTTP Request (Web Request) Demo

by Spatial

Get a dad joke from an external API using Unity's UnityWebRequest.


HTTP Request

Web Request Demo

This project demonstrates how to use Unity's UnityWebRequest to fetch data from an external API. In the demo space, use the Spatial Interactable to get a dad joke!

Additionally, the sample demonstrates:

  • Using LeanTween for animating a UI and changing a material's base color
  • Using C# to subscribe to Spatial component events
  • Animating a skybox
  • Animating text
  • Custom TextMeshPro font
  • A Ready Player Me avatar used as an animated NPC

Try it Out

To try out this template:

  • Download the code using the View Code button
  • Import the package into a new Unity project
  • Follow the steps at Creating a Package to set up the configuration for your package type
  • Test the package in your sandbox