I am attempting to make a card system in which each card is a scriptable object instance with a list of effects that are carried out when the card is played. I have the following effect classes so far:
[System.Serializable]
public class CardEffect {}
[System.Serializable]
public class EarnGoldEffect
{
public int amount;
}
[System.Serializable]
public class StealGoldEffect
{
public int amount;
public bool giveToThief;
}
This is my scriptable object class:
public class Card : ScriptableObject
{
public string cardName;
public string description;
public CardEffect[] activeEffects;
public CardEffect[] passiveEffects;
}
I want to be able to add effects to the active and passive effect arrays on the card and edit their properties in the inspector, but when I add a new effect to the array it is blank with no way for me to edit it. Is there any way to make this work without having to make a custom inspector editor script that has to accommodate every future card effect. I am probably missing something basic but I am not sure how I could set this up.