Serialization depth limit exceeded at 'XXX'. error at unity4.6.2 and unity 4.6.3.

hi all.

run time ,I have this problem in unity4.6.2 and unity 4.6.3. but unity4.6.1 is OK .

Serialization depth limit exceeded at ‘XXX’. There may be an object composition cycle in one or more of your serialized classes.

[System.Serializable]
public class XXX
{
    public List<XXX> childPrefabs = new List<XXX>();
    public XXX(){

    }
}

I don’t want remove this code .

public List childPrefabs = new List();

You’ve created an infinite loop here. Just be glad Unity has a loop counter and didn’t lock you out altogether.

You create an XXX. This has a list of XXX which is serialised. This List contains a serialised XXX. And so on forever. You could remove the [Syste.Serializable] tag, or you could tan the List as [NonSerialised].

public class AAA : ScriptableObject
{
    public XXX xxx;
}


AssetDatabase.CreateAsset(AAA, "Assets/aaa.asset");

I am creat ScriptableObject.but when I used Resources.Load(“aaa”);
error : Serialization depth limit exceeded at ‘XXX’. There may be an object composition cycle in one or more of your serialized classes.