This Unity project features a simple 3D dice game where players can toss a dice and roll it on a ground plane with holes. The game calculates and displays a score based on the outcome of each dice roll.
These instructions will guide you through the process of setting up and running the 3D Cube Dice Game on your local machine.
To run this Unity project, you will need to have Unity installed on your computer. You can download Unity Hub, which is a launcher for the Unity Editor, for free from the official Unity website.
- Download Unity Hub: Unity Hub Download
- Through Unity Hub, install the version of Unity that is compatible with this project.
-
Download and Install Unity Hub:
- Go to the Unity Hub Download page and download Unity Hub for your operating system.
- Install Unity Hub on your computer.
-
Install Unity Editor:
- Open Unity Hub and navigate to the 'Installs' tab.
- Click on the 'Add' button to install a new version of the Unity Editor.
- Select the version of Unity that is compatible with this project (you can find the version in the
ProjectSettings/ProjectVersion.txt
file within the repository). - Include the required modules for your operating system (e.g., Mac Build Support, Windows Build Support).
-
Clone or Download the Repository:
- Clone the repository using the following command:
git clone https://github.com/svenkatrav/cube_3d.git
- Or download the repository as a ZIP file from GitHub and extract it on your computer.
- Clone the repository using the following command:
-
Open the Project in Unity:
- Open Unity Hub and navigate to the 'Projects' tab.
- Click on the 'Add' button and select the root folder of the cloned or downloaded repository.
- Once the project appears in the list, click on it to open it with the Unity Editor.
-
Run the Project:
- After the Unity Editor loads the project, open the "3DCubeScene" from the
Assets/Scenes
directory. - Run the game by clicking on the 'Play' button at the top-center of the Unity Editor window.
- After the Unity Editor loads the project, open the "3DCubeScene" from the
- Spacebar: Toss the dice into the air.
- Arrow Keys: Roll the dice on the ground. The dice will accelerate in the direction of the arrow key pressed and decelerate when the keys are released.