- Home /
Problem with serialization since version 5.0 (Parent/Children relationship)
I have a class like this:
[Serializable]
public class Formation {
public List<Formation> Formations;
}
when I was using older versions of Unity there was no problem, but since uppgrade I keep receiving errors on all classes where class contains children of its type: Serialization depth limit exceeded at 'Formation'. There may be an object composition cycle in one or more of your serialized classes.
It writes about some cycles, but why there would be any problem when there is no infinite cycle, because every child instance must be initialized, so if user wants to make infinite cycle he would do it, but only by initializing children explicitly...
Is this some bug? I read already some thread on forum suggesting removing children, but I don't get why this behavior even occurs.
Btw on this class I wrote last time I didn't even serialize, and didn't even make list instance
Your answer
Follow this Question
Related Questions
Unity Serializer scripting error 1 Answer
Saving Game Confussion 1 Answer
DrawDefaultEditor causing field to be serialized multiple times? 1 Answer
Custom assets give Missing (Mono Script) 0 Answers
OnSerializeNetworkView is not called 1 Answer