How to create Game Menu in Unity 3D

July 10, 2012 | Rishabh Agrawal | General

Follow 5 simple steps to create Game Menu in Unity 3D:

Step 1: Determine Your Game Resolution

Open the Player settings via the top menu, Edit > Project Settings > Player and enter your default screen width and height values into the inspector. I chose to leave mine as the default 600x450px as shown below.

 

Step 2: Creating the Menu Scene

Select the game scene(Your game Scene) within the Project view and duplicate it using Ctrl/Command + D, then rename the copy to “menu” and double-click it to open it.
Note: You can confirm which scene is open by checking the top of the screen, it should say something like “Unity – menu.unity – ProjectName – Web Player / Stand Alone”. You don’t want to start deleting parts accidently from your game scene!

Step 3: Adjusting the Build Settings
From the top menu select File > Build Settings and drag the menu scene from your Project View into the Build Settings’ “Scenes In Build” list as shown below

(Make sure you rearrange the scenes to put “menu.unity” at the top, so that it’s the scene that’s loaded first when the game is played.)

 

Step 4: Adding the Play Button
We’re going to use 3D Text for our menu, so go ahead and create a 3D Text GameObject via the top menu: GameObject > Create Other > 3D Text, then rename it “PlayButton”.

Finally, add a Box Collider via the top menu: Component > Physics > Box Collider. Resize the Box Collider to fit the text if it doesn’t fit it nicely on the PlayButton.

 

Step 5: The Mouse Handler Script

/**
Mouse Down Event Handler
*/
function OnMouseDown()
{
// if we clicked the play button
if (this.name == “Play”)
{
// load the game
Application.LoadLevel(“game”);
}
}

After clicking on the play button:

Your game view will be like:

 

– By

Sonu Odesi


THE AUTHORRishabh Agrawal

Rishabh Agrawal is the founder of Creatiosoft, a company focused on creating high-quality software for the iGaming industry, specialising in poker and card games. With years of experience, Rishabh is dedicated to delivering engaging and user-friendly gaming experiences. Through this blog, he shares his passion and insights to help readers understand the latest trends and advancements in iGaming.

Comments are closed.

Recent Posts

The Future of Mobile Gaming: What to Expect in the Next 5 Years

Over the years, mobile gaming has seen amazing development and innovation utilized by the game development company in India. It…
06 Jun 2023 Rishabh Agrawal

How Do I Get Started With NFT Gaming?

The popularity of the NFT game has created a different fan base. There was a time when games were a…
18 Jul 2022 Rishabh Agrawal

What Are The Top Trends in NFT Marketplace 2022?

The NFTs are the new engaging and revolutionary technology across the globe. Though, these non-fungible tokens appeared for the first…
09 Jun 2022 Rishabh Agrawal