So I am a totally fresh man to C-sharp script, and can anyone tell me what does declare something " [Serializable] " do in most of time ? And could someone give me some tips about how to use it ?
Thanks~:)
When you serialize an object you are telling unity to store the object so you that you can use it at run time in your game. When you create a script, by default unity serializes any public variables that you create. In addition, any variables that are serialized will appear in the inspector.
If you want to serialize a custom class you use [Serializable] and [SerializeFiled] for private variables
http://docs.unity3d.com/Documentation/ScriptReference/Serializable.html