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 Overcast · Sep 28, 2013 at 05:58 AM · loadingsaving

Building sim, saving levels and states

Hi,

I am really just asking for a cursory overview at this stage. Unity answers has a variety of topics about saving, but they are often quite specific and my use case isn't a simple player prefs one.

I am building a sim game, where you build a city, which has inhabitants. In short I need a nice clean way to integrate a save system which can read most objects in the game and save certain data about them. This includes links to other objects, such as a homes dweller etc.

I've done this sort of thing in other engines before but it's a Unity first for me, so if you could kindly help me with some general approaches and what their implications for the design process are(I'm implementing this before I really get stuck in) I would be grateful.

An overview of the saving and loading process would be extra helpful :)

Thanks for your time

Comment
Add comment · Show 5
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 whydoidoit · Sep 28, 2013 at 06:33 AM 1
Share

Serialization is a super complicated subject, especially when saving related assets. It needs designing in from the start. There are a couple of asset store assets that help - including my free Unity Serializer, but it will still take work.

avatar image Overcast · Sep 28, 2013 at 07:36 AM 0
Share

@whydoidoit I just found your plugin a few $$anonymous$$utes ago and watched your video - I am stunned! Having done a semi complex save system once for a game I was loathing this task and I'm just dumbfounded about how well this system looks like it integrates into Unity.

I'll have a look at it properly now, and post some further experience later. :)

Thanks again.

avatar image whydoidoit · Sep 28, 2013 at 07:38 AM 0
Share

Believe me it isn't particularly easy on some kinds of game, especially if you try later in the process :) It works easily for about 80% of people who use it, it can't work on around 5% of cases without significant effort and the rest takes some work!

avatar image Overcast · Sep 28, 2013 at 07:56 AM 0
Share

Fortunately having done this once before I was wary enough to not let myself have much fun with the rest of the project until I had addressed this, from a cursory read of your docs so far, it looks like it should work fine in my project.

Off topic of my current project: It this solution overkill for saving basic grid maps for a game with a runtime level editor?

avatar image whydoidoit · Sep 28, 2013 at 08:08 AM 0
Share

I use the core "UnitySerializer" part to save individual classes etc (as a replacement for BinaryFormatter) it's fine for level editing, people do that frequently. As soon as something needs to reference things in the scene you need to use SaveObjectTree or a proper level serialization. The biggest problem come from getting the right scripts on things that are in the scene (that you might have a reference to).

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

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

Newbie questions! (Variables and Saving) 2 Answers

Saving Levels 2 Answers

SerializationException: serializationStream supports seeking, but its length is 0 when trying to load a save game 1 Answer

How do you save a player's prefered resolution in Unity 2017.1.1f? 0 Answers

Saving and loading to/from Android 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