REST Server


Create a REST server within Unity to provide an Http API for other tools to call into your Unity application. Also can act as a normal HTTP server serving static files.


by Markus-Seidl


★★★★★ star rating
Price History +

Documentation | ChangeLog | Support Form | Feature Requests | Tutorials


Create a REST server within Unity to provide an Http API for other tools to call into your Unity application.


Use cases:

  • 📱 Mobile Browser Apps
  • 🤝 Companion apps for games
  • 👾 Twitch Overlays
  • 🧑‍💻️ Render Servers
  • 🖥 Remote Installations / Displays
  • ...

This is useful to accept commands from companion apps and/or other applications to make Unity more interactive.


Also useful to have remote light installations or displays, that can then be controlled by other commanding software.


Features:

  • Supports Visual Scripting
  • Auto Endpoints (Position/Rotation/Scale, Material and more)
  • Fast, handles multithreading so unity objects can be accessed safely
  • Includes the NetCoreServer library (MIT License), which is a C# server library
  • Supports HEAD, GET, POST, PUT, DELETE, OPTIONS by default and, with a custom implementation, all other methods
  • Register endpoints either directly or with regular expression support
  • Supports query parameters like ?x=3&y=3
  • Includes helper functions to call unity objects from rest server code.
  • Debugging Utilities
  • Simple WebSocket support
  • Handle Multipart Form Uploads
  • Platform Support (tested)
    • Windows (Mono/IL2CPP)
    • Mac M1/Intel (Mono/IL2CPP)
    • Android
    • iOS
    • ⛔ Game Consoles (Untested, I doubt that a platform would allow a game to create servers)
    • ⛔ WebGL (Technically not possible in Unity)