x


saving class array states

I wrote a script that contains a series of class arrays that the user can make adustments to through some OnGUI buttons. After the user has made a change, I would like that to be recorded and saved, so that the modified values can be called back.

I'm having some trouble getting my head around how I could best save this information and how it would then be called back when needed. I'm writing this in javascript so that always helps - thx!

more ▼

asked Aug 11 '10 at 04:23 PM

TinyUtopia gravatar image

TinyUtopia
270 22 26 38

I forgot to mention in my original question that this script is assigned to several game objects, each having their own set of values.

Knowing this would it be better to just save each array, or maybe it would be more efficient to create another array for all of the script instances? Is there a limit to the depth of an array?

Aug 11 '10 at 06:59 PM TinyUtopia
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

PlayerPrefs could prolly do it if it is not a huge amount of data to save.

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

more ▼

answered Aug 11 '10 at 06:32 PM

Julian Glenn gravatar image

Julian Glenn
2.6k 5 12 47

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1396
x351
x130
x17

asked: Aug 11 '10 at 04:23 PM

Seen: 1342 times

Last Updated: Jan 31 '11 at 04:21 PM