Installation / Initial Setup

Add the rest server package to the current project

Download the RestServer Package via the Plugin Manager in Unity by selecting Packages: My Assets in the Package Manager. If you don’t have the Package Manager tool window, you can enable it via the Menu Window -> Package Manager.

Screenshot of the unity package manager

Select the Rest Server Package click on Download on the right side window pane.

Screenshot of the unity package manager right pane

After a short download you can Import the package into the project. Make sure that all files are selected (by clicking All) and click Import.

Screenshot of the unity package manager import dialog

Initial Setup

Create a new GameObject

Screenshot of the scene to create a game object

Add the RestServer as a component to the created GameObject

Screenshot of the inspector to add the RestServer component to the newly created GameObject

Make sure AutoStart is set to true (or provide your custom start method) and the GameObject is enabled. Everything is now setup and new endpoints can be registered.

Further steps

Add some endpoints and/or locations to call by reading the Endpoints documentation. If you encounter compiler errors while doing these steps, please look at the FAQ on how to solve these.