Web Request Node
This doc goes over the Unity Web Request Node...
The Unity Web Request node allows a Mona space to communicate with a web server. The primary goal of the Unity Web Request system is to allow projects to interact with web browser back-ends. For more information, check out the UnityWebRequest documentation.
You could therefore create a space that interacts with information from the web. Examples of this include :
Get information from web data such as a .json or image files to feed into a space.
Send information to a server to store data such as a leaderboard.
Create a text file to track an inventory or scoreboard over multiple spaces.
Realtime data: weather data, news feed, pollution, planets, etc.
Saving game progress: save collected items, areas unlocked, so that you don’t start from scratch next time you play.
You will need to use the latest Mona SDK here if you want to use the UnityWebRequest nodes in Visual Scripting.
UnityWebRequest Example
If you would like to see an example of the UnityWebRequest in action, you can download the following project. If you look into the Cat asset (near the desk) you can interact with it in order to pull cat facts from an external source. Looking into the Visual Script of the asset will give you a simple example of utilising the UnityWebrequest node in Visual Scripts.
To download the project, go here : https://github.com/monaverse/Sample_WebRequestNode
Updating a current Mona Space
If you want to update a current project, the easiest approach is using the Updating the Template SDK documentation.
Alternatively, you could add the required nodes manually by doing the following :
Go to Edit > Project Settings.
Go to Visual Scripting in the left panel.
At the top, expand the 'Node Library' options. This needs to be first.
At the bottom of the 'Node Library' listing, select the '+' symbol to add a new item.
Add the following two items by clicking on the slot and using the search tool.
UnityEngine.UnityWebRequestModule
UnityEngine.UnityWebRequestWWWModule
Expand the 'Type Options' listing above the Node Library listing.
At the bottom of the 'Type Options' listing, select the '+' symbol to add a new item.
Add the following three items by clicking on the slot and using the search tool.
Download Handler
Unity Web Request
WWW Form
Once the items are added, select 'Regenerate Nodes' and select OK once done.
Last updated