After setting some values per Unity Editor-Script and start the game in editor, those values get lost. Example:
// Store values in a Unity3D GameObject
public class RuntimeClass : MonoBehaviour {
public List<string> values;
}
// Set values in editor function
public class EditorClass{
public void setValues(){
values.Add("Foo");
values.Add("Bar");
}
}
During Edit-Time in the Unity-Editor all values are shown correct in the Inspector-Panel. After starting the game in editor those values get lost. I think the problem is that the values are overriden by the internal Unity3D Serialisation-System. So is there a way to force serialisation after seting some values?
Thanks in advanced,
Christian