This blog serves as a guide to users who want to learn how to use our Unity Plug-in to forward real-time data with the Smartsuit Pro to their custom characters within the Unity Engine. Please follow along below as we break down this process!
Please note that the Data Streaming feature within Rokoko Studio is only included under the paid Studio subscription plans. If you are only on the Studio Basic plan and want to take advantage of Data Streaming, check out our subscription plans here.
Enabling Forward Data
Within Studio, click on the cogwheel at the top left to access the settings
Highlight ‘Data Streaming’:
Click the ‘Forward Data’ button to enable it
Make sure that the ‘Forward IP’ is the local host IP (or the IP address for the computer you are streaming the data to)
Ensure that the ‘Forward Port’ is set to 14043
It is also important that the ‘Forward Port’ must be different from the ‘Smartsuit Listen Port’ otherwise it will cause issues
Once these Data Streaming Settings are set, minimize Studio and open Unity.
Set-up in Unity
Click the Unity Launcher to open the Unity program.
Open an existing or new Unity Project (if this is your first time, we recommend opening a new project)
Import your custom character into your project if you haven't already
Right-click on or within the "Assets” folder and click “Import New Asset”
Locate the FBX file(s) with your custom character, click “Import”
Click on the newly imported FBX to see its' details in the Inspector
Click on the 'Rig' tab and make sure that "Animation Type" is set to Humanoid, then click 'Apply'
Import Smartsuit Plug-in from Asset Store
Click 'Window', then 'Asset Store' to pull up the Asset Store in-engine
Search for 'Smartsuit Plugin' and download, then import it into your project
Forwarding Data in Unity
Once your character is imported into Unity, there are three components required on your character prefab:
Animator - to add, click the “Add Component” button in the Inspector of your character prefab, type “Animator” and click “Animator”
Drag and drop ‘Smartsuit Actor’ script into the Inspector of your character
This implements the behavior of a character controlled with a smartsuit
Note: If you are looking to forward data from more than one suit:
Deselect the checkbox for “Auto Select”
Input your Suit ID where it says Hub ID so that the suit is tied with the character
The 3-digit Suit ID can be found to the left of the Smartsuit indicator image located at the top right of Studio.
Do these steps for all characters and suits in use
Drag and drop ‘Scale Avatar’ script into the Inspector of your character
This will scale your avatar joints based on the suit’s body dimensions
Drag and drop your character prefab into your scene view or the Hierarchy tab
Within the Rokoko > Smartsuit folders, drag and drop the ‘SmartsuitReceiver’ prefab into your Hierarchy tab
This is required within your scene for data forwarding to work
Make sure that the ‘SmartsuitReceiver’ prefab is highlighted in the Hierarchy so that you can see the attached script components in the Inspector
Paste the “Forward Port” number that you copied from Studio into both the “Port Range Start” and “Port Range End”
Make sure the Auto Start and Listen Suit checkboxes are checked
Change “Command Port” to 5001
Once you’ve reached this part, click the Play button and you should see your character mimic your movement in the suit!
If you don’t see that the character is moving along with your movements, double check your settings in the Studio and on your ‘SmartsuitReceiver’ prefab to make sure that they are correct
We hope that this guide has helped you understand how to utilize the data streaming feature offered in Rokoko Studio. We’re excited to see what you all can do now given this tool at your disposal! :)
If you continue to have issues setting up data streaming in Unity, feel free to utilize our other tutorial resources or contact us through our support desk: