- Home /
How do you deserialize string into Vector3 using XMLSerializer?
How do you deserialize string into Vector3 using XMLSerializer? I mean, what string should I put in my Vector3 type field in a plain XML file for Unity to read it properly? Real life example: I use XML file to construct levels on-the-fly, and this XML structure reflects my class structure (there is one root class which gathers it all). I want one of my "zones" position to be fed from XML, but when I enter something like "(0f,4f,0f)" it always reads to (0,0,0). Earlier on I did this with XML doc and my custom parse methods, but this is very unelastic and inextensible. How do I do this in 4.5? I don't want to construct custom struct overrides or break Vector3 down to floats.
Your answer
Follow this Question
Related Questions
TextAsset vs StreamReader 2 Answers
Create a Custom Vector3 Object 2 Answers
string to float with f 3 Answers
BinaryFormatter to string 1 Answer
How to get a proper ramming effect? 1 Answer