Hello,
I’m trying to create a combo system for my game, where each combo would be an array, with different characteristics for each attack in it. To create such combo system, I made the following class:
[System.Serializable]
public class AttackCharacteristics : IAttacks
{
//diffrerent values for each attack here
public AttackCharacteristics[] attacks;
public AttackCharacteristics(int _amount)
{
attacks = new AttackCharacteristics[_amount];
}
AttackCharacteristics[] IAttacks.attacks()
{
return attacks;
}
}
The problem is that, because I have
public AttackCharacteristics[] attacks;
it buids an infinite structure and I get an error “Serialization depth limit 7 exceeded…”. I can’t use [System.NonSerialized], because I want to manualy enter values for each attack in the inspector, and I can’t find any other workaround to solve this error.
Thanks in advance for your answer.