9 Debug Unity with Studio
After Chapter 8: Audition in Unity, connect Studio to Unity on the same computer and use Monitor to inspect the game's Action calls and speed variable.
Configure Communication in Unity#
Return to Unity and confirm that you have exited Play mode.
Choose Edit → Project Settings from the top menu to open the project settings window.

Find and expand Harken on the left, then click Communication.

Check or enter the settings below. Bind Address is fixed at 127.0.0.1; you do not need to enter it.
Field
Setting
Bind Address
Confirm
127.0.0.1(local connection, read-only)Port
0(automatically assign the connection port)Auto Discover
Checked
Discovery Port
0(use the default discovery port)Application Name
RollABall_GameThe completed settings should look as shown below.

Once configured, close Project Settings.
Click Play in Unity's top toolbar to run the game.

Leave the game running, but do not move the ball yet.
Connect to the Game in Studio#
In Harken Hub → Projects, find
RollABall_Audioand click Open Project. (Skip this step if it is already open.)
Find the Remote Connect icon in the toolbar at the upper left of the Studio main window and click it to open the connection window.


Find RollABall_Game in the list, click to select its row, then click Connect.

Wait until the status shows Connected to RollABall_Game at …, indicating a successful connection.

Open Monitor and Start Remote Capture#
Once connected, close Remote Connect and return to the Studio main window.
Choose View → Monitor from Studio's menu bar to open the event window.


Leave Monitor open. In the toolbar at the upper left of the Studio main window, find Start Capture beside Remote Connect and click it to begin capturing.

At the bottom of Monitor, confirm that Capturing and Remote: RollABall_Game appear.

Return to Unity and Play the Game#
Return to Unity and make sure the Game view is active.

Use W/A/S/D or the arrow keys to move the ball from rest and accelerate. You should hear the rolling sound.
Slow down and wait for the ball to stop completely. The rolling sound should stop.
Move again and collect several pickups. Confirm that the count increases and you hear the pickup sounds.

Switch directly back to Studio to check the Action and variable records.
Check the Three Action Calls and Results#
In Monitor, set the type to Action, leave the level at All levels, and use Search to look up each of the three Actions in turn.


Enter
Play_SFX_Ball_Roll_Loopand inspect the Description column. Triggered indicates that the Action for starting the rolling sound was triggered.
Replace the search text with
Stop_SFX_Ball_Roll_Loopand confirm that Triggered appears, indicating that the Action for stopping the rolling sound was triggered.
Replace the search text with
Play_SFX_Ball_Pickupand confirm that Triggered appears, indicating that the pickup sound Action was triggered.
Check BallSpeed Updates#
Change the type to Variable, replace the Action name in Search with BallSpeed, and inspect the Set to … records. Confirm that the written values change with speed within the 0–1 range.

End the Debugging Session#
When you have finished checking, click Stop Capture in Studio's top toolbar.

Wait until the bottom of the window shows Stopped - Remote: RollABall_Game, then close the window.

Click Remote Connect in the toolbar to open the connection window.


Click Disconnect and confirm that Disconnected appears at the lower left of the window. Studio is now disconnected from Unity.


Finally, return to Unity and click the stop button in the top toolbar to exit Play mode.

Continue to Chapter 10: Summary.