Roboid Control for Unity
The best way to include support for Roboid Control in Unity is to clone the Roboid Control for C# repository into a subfolder of you Assets folder. Alternatively you can download the zip file and unpack it as a subfolder of the Assets folder.
Roboid Site Server
Typically you want to visualize roboid programmed using Python, C++ or Arduino/ESP-IDF in Unity to see what their behaviour is in a simulated environment.
This is done using a Site Server:
- Create a new GameObject in Unity
- Attach the SiteServer component to the newly created GameObject.
- (optionally) update the port used to receive messages from other participants. If this is not changed, the default port 7681 is used.
Other roboids can then use the Participant script to connect to the Site server. There are multiple options:
- Participant() When no parameters are given to the Participant constructor, the roboid will periodically broadcast a Participant message on the local network on the default port 7681. This will then be picked up by the Site Server and the connection will be made.
- Participant(7682) When only a port is specified, the roboid will broadcast a Parfticipant message on the specified port instead of the default port. The Site Server in Unity then needs to have this alternative port set in the Site Server Component to receive the message and make the connection.
- Participant("192.168.0.22"), Participant("roboids.example.com") When only an IP address or URL is specified, the roboid will periodically send a Participant message to that address. It will not broadcast messages and the address can be outside the local network.
- Participant("roboids.example.com", 7682) Additionally, it is possible to specify an alternative port.
Roboid in Unity
This is work in progress