How To Apply Color To A Game Object In Unity?

What are you going to learn?

Most of the time when you are using Game Objects in Unity, you would like to add some color to them so that all your Game Objects look different from each other.

In this article, I will show you a simple method to apply any color to a Cube.

This same technique can be used to-
👉 apply color to all your Game Objects
👉 build your own library of colors for your game, application, or AR/VR experience

P.S — To make it easier to understand, I will treat “material” and “color” as the same thing for the rest of this article and use it interchangeably. Just remember though, that they are not the same.

Let’s begin with a blank sample scene.

Step 1: Create a folder that contains all the colors

It’s always a good practice, to begin with creating a folder that contains all your colors or materials. This helps in creating a palette(or a collection of colors or materials) and makes it easier for you to apply the colors (or materials) in your palette to the Game Objects.

Right-click in Assets Panel > Create > Folder > Name it “Materials”
Right-click in Assets Panel > Create > Folder > Name it “Materials”

Step 2: Create a material

The next step is to create a color(or material).

Go inside Materials Folder > Right-click > Create > Material > Name it “MyColor”(or whatever you want)
Go inside Materials Folder > Right-click > Create > Material > Name it “MyColor”(or whatever you want)

Step 3: Change the albedo property of the Material

Then select the created material and check out its properties in the Inspector Panel on the right-hand side.

Change the “albedo” property to whatever color you want.

Great! Now you can create a collection of colors using the same technique.

Now we can apply the color to any Game Object.

I am going to use a cube for the demo but feel free to choose any other Game Object.

Step 4: Add a cube to the Scene

Add a cube to the scene
Add a cube to the scene

Step 5: Drag and drop the material into the cube

Then simply drag and drop the material that you created above onto the game object like this👇

Drag and drop the material into the cube.
Drag and drop the material into the cube

That’s it!

You can now create a set of colors for 3D applications, games, or AR/VR experiences that you develop in Unity.

There are many more things that you can do with Materials in Unity to make your Game Objects look stunning! This article is just the beginning. I will brainstorm on some more articles about Materials and what you can do to make your Game Objects stand out in Unity.😉

Enjoy👏

--

--

Get 100+ AR/VR Resources — https://knightcube.gumroad.com/l/arvr-resources | https://linktr.ee/knightcube

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store