Hey guys.
EDITED for clarity.
- I have an editor script that serves as a manager.
- From there, the user set-up various stuff he needs to use : Vector3, Strings, Ints.
- I don't know how many or what types, it could be custom class he made.
- The manager then adds a "Datanode.js" script to a GameObject on the scene.
- Datanode.js contains a Hashtable, which is the easiest way to add such varied information which the user can recall easily with only a name.
- There can be lots of these Datanode.
The user should be able to recall those info at runtime or editor-mode. It works in Editor-mode but as soon as I hit play, or Unity recompiles, all datas are lost. The only way I seem to be able to retain data is by using single predefined vars (int,String,boolean,float) and possibly built-in arrays. Which is definitly not handy for the user to remember.
Any hints/tips/ideas on how to achieve my needs?
On a side note: you should use a Dictionary<int, GameObject>(). You won't have to box/unbox the int and no casting.
– Peter_G