4 Install Unity and Prepare the Roll-a-Ball Project
Before you start: Save the audio project from Chapters 2 and 3, with the three Actions and BallSpeed ready. Now install Unity and create the game project that will use these sounds. Prepare a Unity account and use a Windows computer.
Install Unity Hub and Unity 6#
Click the official Unity Hub installer for Windows to download
UnityHubSetup-x64.exe. Run the installer, follow the wizard, and open Unity Hub. Unity Hub manages Editor installations and Unity projects.Click the sign-in button in Unity Hub and follow the web page instructions to sign in to your Unity account.

If you are learning individually and meet the Unity Personal eligibility requirements, you can use it free of charge without buying a paid license. License activation usually completes automatically after sign-in, allowing you to install the Editor.
If Hub still reports that you do not have a valid license, open Settings → Licenses → Add license, choose Get a free personal license, and read and accept the terms to activate it. If you already have a company or team license, you can continue using the license provided by your organization.


Click Installs on the left, then Install Editor. In Install Unity Editor, find the Archive tab and search for
6000.3.18f1in the search field on the right. Click Install beside the matching result to download it.

Keep the default installation options. Installation progress appears at the upper right of Hub; click it to view the details. When installation finishes, Install complete appears in the same location.


Create the Game Project#
In Unity Hub → Projects, click New project. On the new project page, use the Unity 6 Editor you just installed: select
6000.3.18f1under Editor version.

Select the Universal 3D template.

Enter
RollABall_Gamein Project name. Under Location, select a local parent folder for the Unity project, for example,E:\unity projects. Click Create project and wait for the Editor to open.
The new project opens as shown below.

Get and Import the Roll-a-Ball Sample#
Open the Roll-a-Ball 3D Sample Project page on the Asset Store. Confirm that the publisher is Unity Technologies, then click Add to My Assets to add it to your account.

After completing those steps, return to the new Unity project and open Window → Package Management → Package Manager.


In Package Manager, select My Assets, search for
Roll-a-Ball, select the sample, and click Download.
When the download finishes, click Import 4.0 to project. If a Warning appears, click Import in that prompt.


If clicking Import opens the Warning dialog shown below, click Install/Upgrade:

Wait for the progress bar to finish.

The Import Unity Package dialog appears. Click Next at the lower right, then click Import in the same location on the next page.


Wait for importing and compilation to finish. In the Project window at the bottom of the main interface, find
Assets/UnityTechnologies/RollABall. Double-click Roll-a-ball (Roll-a-ball.unity) on the right to open the scene shown below.

Configure Input and Run the Sample#
Before running the game, change one setting. The ball needs to know which direction key you pressed before it can move. The sample's PlayerController script handles this by reading directional input through Input.GetAxis, a method from Unity's old input system. You do not need to understand the code here.
Unity has both old and new input systems. If the project enables only the new system, the sample cannot read keys through the old one and the ball may not move. Set Active Input Handling to Both so both systems are available. This preserves the sample's existing movement without changing its script.
Choose Edit → Project Settings from the top menu and search for
Active Input Handlingat the upper right of the window.

Scroll down to find Active Input Handling, highlighted in blue. Click its current value and choose Both from the dropdown menu. If prompted to restart the Editor, click Apply and wait for it to restart.


After the restart, close Project Settings.

Click Play at the top of the main interface to run the game. If the game does not have focus, click the Game view so it receives keyboard input. Move with W/A/S/D or the arrow keys. When the ball touches a yellow pickup, the pickup disappears and the count increases.


Then click Stop at the top to exit Play mode.

Save the project by choosing File → Save from the upper-left menu or pressing Ctrl+S.

Chapter check: RollABall_Game runs the Roll-a-ball scene, the ball can move and collect pickups, and the scene is saved. After saving, close the Unity project. Continue to Chapter 5: Integrate Harken Studio with Unity.