First launch
Start Suduxu for the first time and verify that your installation is working correctly.
First Launch
After completing the installation and setup process, the next step is starting Suduxu and connecting your first device.
Launching Suduxu
Add the Suduxu Component prefab to your scene and start the application. From there, the Unity SDK automatically initializes the runtime, loads the configuration, registers all required events, and starts the server.
Initialize Suduxu before launching the runtime:
init_suduxu(
SuduxuBehaviourConfiguration::broadcast("DLL/suduxu")
)?;
launch_suduxu()?;Suduxu runs in its own thread and should remain active for the lifetime of your application.
See Reference/Data-Models for details on the
SuduxuBehaviourConfigurationdata model.
Start the server using:
suduxu server startVerify that the server is running:
suduxu server statusVerify startup
A successful launch should result in:
- The runtime starting without errors
- Network listeners becoming available
- A QR code being generated
- The server accepting client connections
You can verify the current server status through the CLI:
suduxu server statusExpected output (with varying addresses and file-server status):
Server Status:
TCP Address: 127.0.0.1:9000
UDP Address: 127.0.0.1:9001
File Address: Not running
Control Address: 127.0.0.1:50676Connect a Device
Once the server is running:
Open the Suduxu mobile application.
Scan the generated QR code, or connect manually using the server's IP address.
Accept the connection request on the device.
Wait for the device to appear as a connected client.
The QR code contains the connection information required for automatic pairing.
Verify communication
After connecting a device you should be able to:
- Receive button input
- Receive joystick input
- Access device information
- Send vibration commands
- Send logs to the device
- Receive sensor data (if enabled)
A connected device indicates that networking, configuration, and runtime initialization are working correctly.
Next Step
Continue with the Overview section to understand Suduxu's architecture, or jump directly to the API documentation to start interacting with connected devices.