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 Dec 28, 2018 at 07:16 PM by umadgen_unity for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by umadgen_unity · Dec 28, 2018 at 05:44 PM · scene-loadingscene-switchingload scene

LoadScene.Single don't close the current scene

Hello everybody ! I 'm a beginner in unity, and i try to create a menu to switch between scenes. But when i switch, i can see in the background the last scene.

The background camera is a solid color in all scenes. I don't understand why because i use LoadScene.Single to close all others scenes. Before the switch : alt text After the switch : alt text Can anybody help me to find a solution please ? Thank's.

beforeswitch.png (88.0 kB)
aftersiwtch.png (261.3 kB)
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 3kWikiGames · Dec 28, 2018 at 05:54 PM 0
Share

Is this a different scene or is it a different ui element? Could we see a screenshot of your Hierarchy to see if its somehow being carried over into the next scene.

avatar image umadgen_unity 3kWikiGames · Dec 28, 2018 at 06:01 PM 0
Share

It's a new scene. This is the hierarchy for the first scene. alt text This is the hierarchy for the second scene. alt text

The gameobject that i don't show are just container for input field and label. I use a gameobject tabmenu to display menu on all scenes.

sceneclient.png (15.8 kB)
sceneprojet.png (13.4 kB)

1 Reply

  • Sort: 
avatar image
0
Best Answer

Answer by umadgen_unity · Dec 28, 2018 at 07:16 PM

Solution found : I had a singleton attached to each main gameObject. I write DontDestroyOnLoad on the function Awake on my singleton. So i remove the singleton on each gameobject, and i put a gameobject with my singleton.

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

Follow this Question

Answers Answers and Comments

100 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 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 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 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 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 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Loading screen with long-running CPU-heavy Awake() 1 Answer

How to prevent a script from running until the scene is loaded? 2 Answers

Can't find game object / script after scene re-enter 1 Answer

How do I return scene using bulid index scenemanager in c# 3 Answers

Wierd problem when reloading scene, public gameobject does not get assigned... 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