- Create a new Unity project
- Replace the whole Asset folder in your Unity project folder
- Open "Package Manager" (in [Window] tab)
- Cick the "+" on the top-left corner, choose "Add package from Github URL"
- Paste the URL below, and hit [Enter] or click [Add] on the right side
which would look like this:
https://github.com/endel/NativeWebSocket.git#upm
- Packages preparation done
- Find the Canvas object from the component list on the left side (usually), and click it.
- Open "Inspector" window if it's not open:
[Window] tab -> [General] -> Inspector - Click "Add Component" at the bottom of the Inspector window,
choose [Scripts] -> [Send OOCSI Msg With J Object] - In the [Send OOCSI Msg With J Object] block of the Inspector window, click the small circles on the right side of components start with "Button ..." and double click the only component on the list
- Repeat 4. for the "Text ..." component
- Enter the channels for sending and receiving messages from OOCSI in the next two components
- Scene preparation done, and which would look like this:
- An active project
- An active IoT dataset, which is set to listen to the "Channel_to_send" of OOCSI channel you have in Unity.
- A device in the same project, the ID ("device_id" in script) is required for Data Foundry to store data from OOCSI
- Data Foundry preparation done
Click the play icon in the center of up side
- Just "Click me!!"
- Check the incoming data of your IoT dataset on Data Foundry
- Open the URL with browser: https://oocsi.id.tue.nl/test/visual
- Enter the "Channel_to_receive" of OOCSI channel you have in Unity to the "Channel Name" on the right side.
- Click "Send"
- Check your Unity, the text will be replaced by the incoming message