Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by Rikanano · Dec 14, 2011 at 06:05 PM · 2d gamemenu

Start Up Menu For 2D Game

Hey guys, I'm creating a game for a Uni project and as simple as it may sound I'm just looking to find out the best way to come about making a start up screen for my game, which will include buttons like "Start Game", "How To Play" and "Quit" I know the simple code to make the buttons through GUI but I've made some buttons of my own through Photoshop and was wondering how I would implement them into buttons?

Thanks in advance!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

5 Replies

· Add your reply
  • Sort: 
avatar image
4
Best Answer

Answer by Grady · Dec 15, 2011 at 08:57 AM

What you can do, is export your buttons from photoshop as .PNG and import them into unity.

Then create a new plane by going to:

GameObject > Create Other > Plane.

Then drag your three different buttons onto three different planes. Once you have done that, then position a camera where it can see your buttons in a scene.

Then add colliders to each plane, and a script like this:

 function OnMouseDown(){
     Application.LoadLevel("yourFirstLevelToLoad");
 }

Then just change yourFirstLevelToLoad to the name of the scene which you want to play when the player clicks on the "Start Game" button. Save the script and then attach it to the "Start Game" button.

You would want to do the same thing for the "How To Play" button as well!

Then for the quit button, just add the same code once again, but change Application.LoadLevel("yourFirstLevelToLoad"); to Application.Quit(); which, when clicked, will quit your game!!!!!!!!!!!!!!!

Hope this has helped you, and if not, feel free to comment back!!!

-Grady

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image fafase · Dec 15, 2011 at 10:45 AM 0
Share

Your answer is pretty much the same as $$anonymous$$e but yours is best explained maybe, more code orientated. All in all I guess point is made. $$anonymous$$y point in giving fewer details is just that for the guy to learn he needs to put a little work in it. If you give him the answers he will just copy paste. I have seen many people on this forum complaining that some questions are simply "What is the code for" so my contribution is to give an algorithm like explanation more than the actual code (even though I gave some code things there too...)

avatar image Grady · Dec 15, 2011 at 10:53 AM 0
Share

True, but hopefully he will be able to understand this and then research for himself in the future!!!!! But yes, my answer is pretty much yours in more detail!!!!

avatar image
1

Answer by BarkShark · Dec 14, 2011 at 07:24 PM

U can use GUI Styles or GUI Skins to create nice looking GUI. You can change the texture for example when the player hoovers over the object or clickes on it. Just check out the script reference about GUI.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
-1

Answer by Rikanano · Dec 16, 2011 at 01:59 AM

Thanks guys, yeah I know he pretty much has told me how to do it, but I do havea deadline soon so giving the code is much appreciated! I will be looking into this further so that I can remember it in the future (: but thanks guys!

JD

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by HabibAli · Nov 18, 2013 at 08:16 AM

Any example would be great if anyone could share

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by swag_swag · Mar 18, 2014 at 03:12 AM

I realize it's been a few years since this question was asked and answered but considering I ran into it looking for help, others may as well.

Just a note: You do NOT need to add a collider to the plane as Grady said. It may have been like that in the older version but on the newest version (4.3.0f4) it is not necessary.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Is it computationally intensive to create image gameobjects at runtime or to have pre-made gameobjetcs? 1 Answer

Sprite not Rendering when animating in z-axis in a 2d Game 3 Answers

Unity 2D Particle System Interaction. 0 Answers

Sprite is stretched on Y scale bug (2D game) 1 Answer

This script is not displaying scenes in unity properly. How would you fix it? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges