• 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 Thomas Phifer · Jul 15, 2010 at 06:55 PM · gamesavestate

How do you save a game in Unity iPhone?

I just want to save my game state and load it later.

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 Eric5h5 · Jul 15, 2010 at 08:23 PM

Save the appropriate variables with PlayerPrefs, and then load them (also with PlayerPrefs).

Comment
Add comment · Show 3 · 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 Thomas Phifer · Jul 16, 2010 at 03:16 PM 0
Share

I'm aware that PlayerPrefs is the method, but how exactly do you use PlayerPrefs? I can't find it in documentation.

avatar image Eric5h5 · Jul 16, 2010 at 05:50 PM 0
Share

http://unity3d.com/support/documentation/ScriptReference/PlayerPrefs.html

avatar image bernardfrancois · Mar 11, 2011 at 11:56 AM 0
Share

Not that saving a lot of variables to PlayerPrefs may be very slow on iPhone. If you have this issue, you can try the following custom PlayerPrefs class: http://www.previewlabs.com/writing-playerprefs-fast/

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

No one has followed this question yet.

Related Questions

Suggestions for Persisting Items' and Enemies' state between Load? 5 Answers

Game Foundation: C# "using" namespace error 1 Answer

Saving Instantiates in safe file? 1 Answer

How to make Save Game feature? 6 Answers

How to dynamically save scenes 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges