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
0
Question by Tyrus1235 · Jun 01, 2013 at 03:29 AM · scenescene-loadingapplication.loadlevel

Application.Loadlevel loads incorrect scene.

Okay, so I'm making my first Unity project as a college thingy. At any rate, I made a simple 2D platformer with a single level. During said level there are hazards that, when touched, take the player to a "Game Over" scene (which, in turn, takes them to the main menu). That is working properly. My problem comes when the player reaches the goal (aka the end of the level) and the script there should send them to another scene called "The End" but instead calls "Game Over". Some things of note are: - I am using only strings to ID the scenes, though I tried using integers and nothing changed; - Any valid string or integer that I put into the ending script's Loadlevel takes the player to "Game Over"; - Every other Loadlevel in my project is working 100% fine.

Comment
Add comment · Show 2
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 Tarlius · Jun 01, 2013 at 03:30 AM 0
Share

Just throwing out ideas here, but are you sure theres not something triggering the game over just before the victory script, perhaps a case you didn't think of? Perhaps the end point itself is a type of "hazard" or something. Or has the hazard script attached to a child?

Is this happening in the editor or just the deployment? Its possible to not include some scenes when you build, although I think if you try to load a level that isn't there you'll just get an error.

avatar image Tyrus1235 · Jun 01, 2013 at 03:44 AM 0
Share

I'm pretty sure it's not being triggered just before it because the scrip that calls for the "Game Over" scene is only attached to a prefab. I used an entirely new object to make the end goal (with an entirely new script as well). Also, I didn't put the end goal as a child to anyone. When you mention deployment I have to admit I didn't try building and running it yet (so all my experience with it is within the editor). Should I try to Build & Run to see if it'll work nonetheless? Oh! Another important detail I forgot to add: When I disable the "Game Over" scene in the Build Settings, the end goal properly loads the "The End" scene.

0 Replies

· Add your reply
  • Sort: 

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

15 People are following this question.

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

Related Questions

Load Scene from within folder? 2 Answers

My button won't load a scene 1 Answer

SceneManager.GetAllScenes() only returns the current scene 3 Answers

,Enums not being passed between scripts properly 1 Answer

How do I reset part of a scene? 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