How can I save gameObject?

I would like to make custom bars where you put your spells. Like in World of Warcraft when you move your spells to your bars or Hearthstone where you make your own builds. How do I save it? I know you can save stuff like float,int or position of that object, but can you actually save gameObject or work with prefabs in the code (something like apply button on prefab, but I think I’ve read that prefab is just something in Unity Editor)?

If I were to implement such a system, I would keep individual elements separate (like spells) and save the appropriate data to disk so that later I can read it and re-create the list of spells (own build). This way there is a clear separation of your game model with your game controllers (game play code).

I personally use JSON and save data in plain text (but you can also encrypt if that is required)

You can start with this
http://wiki.unity3d.com/index.php?title=JSONObject

Quick JSON reference : http://www.json.org

Hope this helps!