UNITY LINK

Spikey Rain

Build a game, from asset creation to a standalone application.

In this project, we will build a game that simulates a series of spikey objects falling down onto a platform.

Project Setup

Load the UnityLink package and create a new project called SpikeyRain in your home directory:

Create three asset directories that we will use to keep the project organized:

Create a new scene and save it to the Scenes directory:

Create a Unity mesh and save it to the Meshes directory:

Scene Setup

Create a platform for the spikey objects to land on:

Set the amount of spikey objects to generate:

Generate a random position for each spikey object:

Generate a random color for each spikey object:

Create a material for each spikey object with the corresponding color:

Create the spikey game objects:

Set the positions of the game objects:

Set the materials of the game objects:

Set the scale of the game objects:

Add a Rigidbody component to each spikey object:

Set the Convex property of the MeshCollider components to be true:

Delete the default directional light:

Add a Light component to each spikey object with its corresponding color:

Running and Building

Save the scene:

Run the simulation to watch the spikey objects rain down:

Stop the simulation:

Build the project to create a standalone application:

Run the application: