Opening document…

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

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#

  1. 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.

  2. Click the sign-in button in Unity Hub and follow the web page instructions to sign in to your Unity account.

    image.png

    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.

    image.png
    image.png

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

    image.png
    image.png

  4. 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.

img_v3_0216m_06ec998a-e4a9-4db4-917b-aebd273f1d6g.jpg
20261021-133803.jpg

Create the Game Project#

  1. In Unity Hub → Projects, click New project. On the new project page, use the Unity 6 Editor you just installed: select 6000.3.18f1 under Editor version.

    img_v3_0216m_4509536f-a703-47c1-9d6d-08a4b4d4d85g.jpg
    img_v3_0216m_9703b653-5f67-458d-8331-08639181e34g.jpg

  2. Select the Universal 3D template.

    image.png

  3. Enter RollABall_Game in 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.

    image.png

    The new project opens as shown below.

    image.png

Get and Import the Roll-a-Ball Sample#

  1. 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.

    img_v3_0216m_a56e3af4-f093-492f-972b-99ac1af228ag.jpg

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

    image.png
    image.png

  3. In Package Manager, select My Assets, search for Roll-a-Ball, select the sample, and click Download.

    image.png

  4. When the download finishes, click Import 4.0 to project. If a Warning appears, click Import in that prompt.

    image.png
    image.png

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

    image.png

  5. Wait for the progress bar to finish.

    image.png

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

    image.png
    image.png

  6. 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.

    image.png
    image.png

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.

  1. Choose Edit → Project Settings from the top menu and search for Active Input Handling at the upper right of the window.

    image.png
    image.png

  2. 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.

    image.png
    image.png

    After the restart, close Project Settings.

    image.png

  3. 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.

img_v3_0216m_c6c26980-189f-42d5-bfa7-19a2083a8eeg.jpg
img_v3_0216m_5ef7a68d-0f83-4c49-afc9-d1980248106g.jpg

Then click Stop at the top to exit Play mode.

img_v3_0216m_1b747bbd-f1c9-4e9f-967e-40e3de8132ag.jpg

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

img_v3_0216m_4fc61d13-e8d3-47a2-a217-55c5ef18eceg.jpg

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.