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 /
  • Help Room /
avatar image
0
Question by mentorvindez · Dec 31, 2016 at 10:50 PM · eventeventsystemscenesscene-changescene load

How can I change completely the scene?

Hello friends, I'm doing a question tipically of a noob. But I'm starting in the programming of games and in Unity3d too. I have to say this is awesome, but I have this problem, I can't change the scene without delete the previous scene and their objects. I have a Trigger in a location of the screen, and an event, the events makes change the scene when the mouse is pressed into the trigger, but when it happends, the scene changes but the colors and objects are mixed with the "current" scene. How can I fix it? The code below is the same I have in the event (and using the same script in both scenes):

         *Scene escenaActual = SceneManager.GetActiveScene();
         string nombreDeEscena = escenaActual.name;
         Debug.Log(nombreDeEscena);
         if (nombreDeEscena == "scene2")
         {
             
             Application.Quit();
             SceneManager.LoadScene("scene", LoadSceneMode.Additive);
             
             
         }
         else if (nombreDeEscena == "scene")
         {
             Application.Quit();
             SceneManager.LoadScene("scene2", LoadSceneMode.Additive);
         }*








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 PizzaPie · Jan 01, 2017 at 06:46 PM 1
Share

Unless you want to keep the objects of the first scene you should change the LoadScene$$anonymous$$ode to .Single ins$$anonymous$$d of .Additive that way it won't keep the objects of the first scene. If you want to keep some objects from the initial scene use the DontDestroyOnLoad function. Now if you want to keep everything from the initial scene you have to design next scene based on the first so objects won't get mixed up. Lastly to save a Scene you can go to File->Save as->name it and save it, after that the scene will be inside the asset folder unless you change it, double click it and will bring up the saved scene. You can have as many scenes you want. Hope that helps.

avatar image mentorvindez PizzaPie · Jan 01, 2017 at 07:32 PM 0
Share

Thanks, the problem was just that, the "LoadScene$$anonymous$$ode.Additive" I changed it to "Single" and everything is working. Just keep having a little problems with the colors of the objects now, but I think I can fix it easy. Greetings and have a nice new year!

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by EngineGeek12 · Jan 01, 2017 at 05:03 PM

Go to File, save scene as, then save to the Unity Game Location

Go to: Documents, " The Projects Name" then name the scene

You can then save it and make a new scene

I hope this helps... I would wait for another person to answer because It's always good to get even more help

Also, make sure that you let me know if it works, just want to make sure your problem is solved...

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 mentorvindez · Jan 01, 2017 at 07:35 PM 0
Share

Thank you, I saved the scenes before, but the problem was in the LoadScene$$anonymous$$ode method. As says "PizzaPie" above, using LoadScene$$anonymous$$ode.Single ins$$anonymous$$d of LoadScene$$anonymous$$ode.Additive, in the moment to change the scene, all objects of the first scene has been destroyed. Have a nice new year!

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

89 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

Related Questions

So i want this problem with ui buttons done 1 Answer

Adding EventTrigger.Entry to EventTrigger component via script doesn't update component's editor UI 0 Answers

multiple of same objects from DontDesroyOnLoad 0 Answers

EventSystem.current is returning null 0 Answers

Need help with trigger event! 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