Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
This question was closed Nov 20, 2016 at 02:23 PM by Mrkrisher.
avatar image
0
Question by Mrkrisher · Oct 30, 2016 at 09:33 PM · scenescene-loadingscene-switchingscene-changescene change

How Do I Link Different Scenes?

I have a game where you roll a ball around and collect a certain amount of objects while trying to avoid obstacles and not fall off the given map. How do I link another level, so that when the player finishes the first round, they can automatically be taken to the next one, or get a choice to move to the next one? The more answers the better! 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

4 Replies

  • Sort: 
avatar image
1

Answer by Praydude · Nov 11, 2016 at 08:34 AM

There is a fantastic Tutorial on this in the Live training sessions. Here is the link... https://unity3d.com/learn/tutorials/topics/user-interface-ui/creating-main-menu

Super awesome and easy to follow. Good luck!

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 tanoshimi · Oct 30, 2016 at 09:33 PM

File -> New Scene?

Comment
Add comment · Show 8 · 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 Mrkrisher · Nov 01, 2016 at 09:47 PM 0
Share

How would I link the scene, though? So like when you click "Play" on the First Scene which is $$anonymous$$ain $$anonymous$$enu, how do I make it so that it directs the person to the game scene (which I have made.) Would I need a script? If so, what should I put?

avatar image Zitoox Mrkrisher · Nov 01, 2016 at 11:40 PM 0
Share

Are you talking about a LOADING SCENE? Do you want to change scenes? Example:

There is a main menu with a "Start Game" button. When you click the button, you go to other scene. Are you trying to do this? I can help you with that =]

avatar image Mrkrisher Zitoox · Nov 01, 2016 at 11:52 PM 0
Share

Yes, that's exactly what I'm trying to do. Like when you first load the game, the main menu pops up. You click "Start" and it takes you to another scene.

Show more comments
avatar image Mrkrisher · Nov 02, 2016 at 12:50 AM 0
Share

I don't see your answer. @Zitoox

avatar image Zitoox Mrkrisher · Nov 02, 2016 at 12:51 AM 0
Share

Refresh the page.

avatar image Mrkrisher Zitoox · Nov 02, 2016 at 12:52 AM 0
Share

Oh oops :D

Show more comments
avatar image
0

Answer by josetgg · Nov 01, 2016 at 11:49 PM

You need to add the scenes to "scenes in build" on the build settings window. Then on a script that lives on a gameobject in your scene yo have to call UnityEngine.SceneManagment.SceneManager.LoadScene("YourSceneName"); when you want the scene to change. You can avoid the long line by adding using UnityEngine.SceneManagement; to the top of your script outside of the class and just use SceneManager.LoadScene("YourSceneName");.

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 Zitoox · Nov 02, 2016 at 12:50 AM

I assume that you already made your scene and that you just need the script. If not, just reply and i will try to help. It should work!

First, create a Javascript and poste the following code:

 var isQuitButton = false;
 
 function OnMouseUp() {
     //Mark this checkbox if it is a Quit Button.
     if (isQuitButton) {
         //If the checkbox is marked, the game will close.
         Application.Quit();
     }
     else {
         //The level to load. Insert the number here.
         Application.LoadLevel(2);
     }
 }

Attach this to your button/collider/text/etc... Note that you will need to make one script for each scene, as it is difficult to make one script for all the scenes in your game. After attaching the script to your button, you will see a checkbox saying "Is quit button". If you have an exit button in your game, attach the script to it and mark the box. If it isn't a quit button, just ignore. It is pretty simple, when you click the button, the game will load your scene.

As you might now, in the BUILD settings, you can attach the scenes of your game. Each scene has a number. For an example, if i want to load my tutorial scene, i will check in the build which number it has. If it has the number "2", then i am going to use 2 in this part of the code: Application.LoadLevel(2);

Hope it helped!

Comment
Add comment · Show 1 · 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 Zitoox · Nov 02, 2016 at 12:53 AM 0
Share

Oh, the scene might become dark and gray when you load it inside the editor, but relax, it is just in the editor. If you build your game, it will work normally. Unfortunatelly, i can't guide you on here, because i know some loading tricks that might be very helpfull. I wish i could =\

Follow this Question

Answers Answers and Comments

6 People are following this question.

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

Related Questions

,Enums not being passed between scripts properly 1 Answer

Re-loading a scene but on the background older scenes are displayed 1 Answer

SceneManager onActiveSceneChange Pause for a while before loading a new scene 0 Answers

UnloadSceneAsync() does not seem to work with additive scenes. 1 Answer

SceneManager.LoadScene not working with button 1 Answer


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