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 SoundGuy32 · Jun 16, 2010 at 04:52 PM · iphonesavexmlserializebinaryformatter

Serialization in unity Iphone basic

Hey, i'm trying to find a way to save a whole lot of savegame data. using unity iphone basic , latest version (1.7)

I've been trying several approaches. 1. First i tried to use a Binaryformatter method frmo this post : http://answers.unity3d.com/questions/971/how-to-scrip-a-save-load-game-option (i did a small change and instead of saving it to a file stream i save it to a memory stream, convert to Base64 and save to profileprefs)

it worked perfectly in the editor, then when i came to compile and try it out on the device i got this error: This mono runtime was configured with --enable-minimal=reflection_emit, so System.Reflection.Emit is not supported.Program received signal: SIGABRT

Reading on the matter i found this thread: http://forum.unity3d.com/viewtopic.php?p=335296#335296

but i chose in player preferences to use .net 2.1. instead of 1.1 (p.s. do i need to do a rebuild when i change player settings?)

2. Then i tried this method with XML: http://www.unifycommunity.com/wiki/index.php?title=Save_and_Load_from_XML

It fails when i try to serialize a class that has a hashtable in it : InvalidOperationException: There was an error reflecting field 'itemsInventory'.

I'm really stuck here, as i have dozens of classes in the game and i wouldn't want to start implementing manual serialization functions for every class. especially those ones with arrays and hashtables.

what can i do ? any ideas?

Oded

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

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by BoredKoi · Jun 23, 2010 at 12:15 PM

You won't be able to serialize generics / dictionary objects in Unity iPhone 1.7. There is mention this will be supported when 3.0 comes out.

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 SoundGuy32 · Jun 24, 2010 at 05:46 AM 0
Share

bummer. well, i did some stuff with X$$anonymous$$L serialization, which paritally worked when not dealing with floats of complex types.

avatar image
-1

Answer by sims11tz · Oct 05, 2012 at 12:15 AM

bump,... anybody have any luck serializing hashtable or generics in unity 3.5 ios ?

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 Michal-T935 · Nov 10, 2012 at 12:21 AM 0
Share

I can deserialize lists on iphone in 3.5 (data sent over the wire from a mac) but can't serialize them. Get the below error:

Unhandled Exception: System.ExecutionEngineException: Attempting to JIT compile method 'UInt32__Type$$anonymous$$etadata:.ctor ()' while running with --aot-only.

I suppose I'll have to convert the list to an array to work...

avatar image
0

Answer by user-5056 (google) · Sep 29, 2010 at 04:30 PM

Has there been any word of the offical support of this. We're getting an issue at runtime serializing some data in the 3.0 beta

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.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Loading Xml file issues 0 Answers

saving gameobject script references to xml 1 Answer

Write to XML-file within Assets\Resources 1 Answer

Saving important data securely 2 Answers

Unity iPhone: Can I store data on the iPhone to be used later? 4 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