Opening document…

The interface could not load. You can still read below. Retry

8 Audition in Unity

After completing Chapter 7 and saving the scene, run the game to audition the rolling and pickup sounds. You do not need to connect Studio or start Monitor for this chapter.

Run the Game#

  1. Click Play in Unity's top toolbar.

    image.png

  2. Click the Game tab, then click anywhere in the game view so it receives keyboard input. Move the ball with W/A/S/D or the arrow keys.

    The Unity Game tab and the running Roll-a-Ball scene

Audition Rolling and Pickups#

Move around the middle of the play area and try the actions in the table:

Game Action

Expected Sound

Start moving from rest

The rolling sound starts and plays continuously

Accelerate and decelerate

Rolling volume changes with speed and stops increasing at the mapping's upper limit

Come to a complete stop, then move again

The rolling sound stops, then starts again when the ball moves

Collect pickups one at a time

Each pickup plays one sound; repeated pickups can produce different samples without interrupting the rolling sound

Listen to the video below for a reference of the result:

After Auditioning, Click the Stop Button at the Top and Leave the Unity Project Open#

image.png

Additional Notes:
Common Auditioning Problems#

Symptom

Check First

The ball does not move, or the old Input API is unavailable

Follow Chapter 4 to check Active Input Handling=Both, restart when prompted, and click the Game view to give it focus. First confirm that the original sample is playable.

The Harken / Harken.Unity namespace cannot be found

Confirm that the Unity Integration Package from Chapter 5 is fully installed, not merely that Link Projects is complete. Do not keep multiple copies of the integration package in the same Unity project.

No ready message, or a request for HarkenAudioSystem

Check that a Harken Audio System is enabled with Auto Start on. Look for earlier startup errors in Console first.

Pack not found, or runtime startup fails

Check that both paths point to the same Assets/GeneratedPacks root folder, that the Windows folder contains Init.bytes / Init.json and a pair of files for each of the three Actions, and that the latest export succeeded. Do not copy only a single .bytes file.

An Action cannot be found in the current export

Check that component strings match the Studio object names and all three Actions are included in the export. After renaming or changing objects, export again and rerun the game.

Pickups increase the count but are silent, or repeated pickups play only the same sample

Check the Pick Up Tag, Is Trigger, and component attachment. The pickup Action's Target should be a Random container containing three different Sounds.

One pickup plays multiple sounds or repeats continuously

Check Random's Single setting, Loop=1 on the container and child Sounds, and that the Action has only one Play step. Weights cannot fix playback count problems.

Rolling volume does not change with speed

Check BallSpeed spelling, the Smooth type and 0–1 range, the Volume binding, Full Volume Speed, and the latest Packs. The script writes a global variable.

Rolling does not stop after releasing the keys

First check whether the ball is still sliding. If it is stationary but the sound continues, check that the Stop Action was exported, its name is correct, and its Stop Target matches the playback target.

Continue to Chapter 9: Debug Unity with Studio.