You can create a “paramClass”, that will store parameters, such as rotation velocity.
Pseudo code example :
[Serializable()]
public class MyParameters
{
public float RotationVelocity {get;set;}
}
public class Test
{
public Test()
{
MyParameters myParam = new MyParameters();
XmlSerializer serializer;
myParam.RotationVelocity = 6.0f;
// Save -> That will create a xml file holding your class in the resources folder
serializer = new XmlSerializer(myParam.GetType());
using (TextWriter writer = new StreamWriter(Application.dataPath + "/Resources/myparmeters.xml" ))
{
serializer.Serialize(writer, myParam);
}
myParam = null;
//Load -> Load the result from the stored file
TextAsset textAsset = (TextAsset)Resources.Load("myparmeters.xml");
serializer = new XmlSerializer(myParam.GetType());
XmlReader reader = XmlReader.Create(new StringReader(textAsset.text));
myParam = (serializer.Deserialize(reader) as MyParameters);
}
}