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 linesey · Dec 05, 2012 at 12:49 AM · movementsceneoptimizationscene-loading

how to move between scenes

I’m working on a sci-fi FPS, it’s all going fine but the amount of lighting I’m using is causing some performance problems. I have fixed this by removing unneeded lights, but if this is harming performance now even high-end comps won’t be able to move if I continue building in the same scene, so I need to change the scene for the different parts of the game. But as my player moves around he will use ammo, take damage, get new guns, and kill things, also he will have to move all over my space station and back into scenes he has already been in, so my problems are.

1: how do I change scenes but keep my players stats (hp, ammo, etc.) the same 2: how do I keep the old scenes the same, (anything that dead stays dead and over all it looks like when the player left the scene 3: how do I do this so the player can easily move from scene to scene (I have lots of doors so I can attach a collider to them

I think this will involve a is trigger and on trigger enter but that’s about all I can think of, and well a script.

I’m not an expert on scripting but I know a bit and I know how to look up parts of a script I don’t understand.

I’m not asking for someone to write me a script (it would be very nice if someone could) but even just telling me what kind of scripting statements I need to look up and read about would help thank you all very much :)

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

1 Reply

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

Answer by coastwise · Dec 05, 2012 at 03:19 AM

There are many ways to skin those various cats, but heres what comes to mind:

  1. DontDestroyOnLoad prevents objects (like your player character) from being destroyed when loading a new scene. Can be tricky though...

  2. What you describe requires some form of Persistance. The built-in Unity way is PlayerPrefs, but you might look into some more advanced solutions for saving in the Asset Store.

  3. A trigger, yes. And in the `OnTriggerEnter`, a call to Application.LoadLevel

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 linesey · Dec 11, 2012 at 07:59 AM 0
Share

thanks looks like what i need, tells me what to look into so i can start seting things up.

and you say that i should get a saving asset from the asset store, any recomendations?

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

10 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

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

scene loading 100's of scenes 3 Answers

Scene inside a Scene 3 Answers

How do i Make more levels in my game 2 Answers

Scene object scripting 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