Getting Started: Streaming to Unity

In this article:

Detailed guide on how to livestream your motion data to a custom character in Unity.

For any workflow-related issues, join our Discord server.

Requirements

  1. Unity 2018.4.x LTS or higher
  2. Rokoko Studio (Plus, Pro, or Enterprise Subscription for streaming)
  3. Rokoko Live plugin for Unity

 

Livestream to Unity

1. Open Rokoko Studio and select one of your existing Scenes.

2. Go to the right column and click on Livestreaming.

livestreaming.png

3. Turn on streaming to Unity by clicking the cog ⚙️ icon, followed by activating the existing Forward IP and Port. Then click Activate.

ezgif.com-crop_2_.gif

 

Setting Up Your Character

Drag your desired character into Unity, change the Rig Type to Humanoid in the Inspector panel and click Apply at the bottom.

Drag your character into the scene view and place it in XYZ, 0,0,0.

In the Inspector panel add the Actor component to your character. In the Profile Name parameter add the name of the Actor Profile in Rokoko Studio that you want to receive the data from. 

Click on the Self button next to the Animator Parameter. 

Face Capture

To get face capture working on your character (given that it follows the ARkit blendshape structure) add the Face component to the character. Set the Mesh Renderer to the skinned mesh of your character.

Then in the Face parameter of the Actor script click on the Self button. You should now see it be populated with the right settings. 

This is the final configuration of our character in the inspector panel.

Streaming the Data

Go to your Hierarchy panel, create an empty gameobject and call it "Studio Manager". Add the Studio Manager component to the newly created gameobject. Set the Receive Port to the streaming port set inside of Rokoko Studio. The default is 14043.

Press play and you should now see your character moving according to the streamed data.

Articles in this section

Knowledge base