• 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 shellyalon · Jun 11, 2013 at 08:01 PM · scenesaveloadserializer

Remembering the state of a scene

Hi, i need some advice.

Im new to unity but kinda starting to find my way in it. Im building a point and click game with different scenes. The player interacts with the scene, lets say he opens a door, and thus the door-object ist changing its texture. Now, what is the best option to save this state so when i go to another scene an them return the door eill be still open, although it's not the scenes starting preference.

I googled and searched and found some ways : thru playerprefs, which seems pretty hard. Do i have to like save the state of the door (its texture) the moment it changes, and when entwrng the scene anew, load this thru the playerprefs? And this with every object and any change?

: i saa this plugin, unityserializer, which seems good. Is it the right thing for me? Can i load the saved objects and their states of a scene when i get into it and save them when i leave to another scene?

: is it maybe possible to make objects and their preferences static, like, they won't change when i leave the scene and starting it anew?

Thanks for the answer. :)

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
0

Answer by Rambit · Jun 11, 2013 at 08:21 PM

I'm kinda new myself but the way I would solve it would be to have just one scene. Every room is it's own GameObject with everything in the room as a child of that GO. Then I would just deactivate/activate rooms(the parent GameObject) accordingly to what door you enter.

Eg: When you enter a the door in Room1 to Room2, you just deactivate the Room1 Gameobject and activate the Room2 GameObject. When you go back through the door you just do the opposite and everything will be the way it was before you deactivated it.

I don't know if this is the best way to do it, but I think it would make it a lot easier than saving everything to Playerprefs or using a Plugin.

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

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

16 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

Related Questions

Saving and loading scene specific data - (safe for scene renaming) 1 Answer

container class save based on Cherno's example 1 Answer

Save & Load Game question 3 Answers

Unity Serializer: How to load last save 1 Answer

A node in a childnode? 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