How to make a custom type's contents modifiable in an array by inspector?

Hello everyone,

I apologize if my question is too vague, but I’m kind of a novice at this sort of thing.

My idea is to have collectibles objects in my game, with a only a few strings of data and a sprite, and to call this info into a button/list when its toggled.

But I’m not sure how to do this? I’ve made a custom data type with the fields for the information in the Collectible Class, and a parent class which has an array for the collectible class, but when I expand the array in the inspector to hold the nested Collectible infos, it just shows up as Empty

I’ve attached a snippet script of what I’m getting at

public class BadgeInfoRepo : MonoBehaviour
{
    public BadgeInfo[] badgeInfoRepo; /*<- would like to have, say 10 BadgeInfos and fill their contents in the inspector*/

}
public class BadgeInfo : MonoBehaviour //an idea to make a container style type
    {
        public int badgeNum;//the badge number
        public bool badgeCollected;//collected yet
        public Sprite badgeIcon;//the icon
        public string badgeName;//the name
        public string badgeDescription;//a quick description of it
        public string badgeCost;//the cost of the badge
    }

How could I get this thing to work?
Thank you!

Instead of public BadgeInfo[] badgeInfoRepo;,
use public List<BadgeInfo> badgeInfoRepo;.

You’ll be able to see the collectible info in the inspector.

As for the Collectable info (if that only contain variables to store data), don’t inherit from MonoBehaviour. Something like this would suffice.

    [Serializable]
             public class BadgeInfo
                 {
                     public int badgeNum;//the badge number
                     public bool badgeCollected;//collected yet
                     public Sprite badgeIcon;//the icon
                     public string badgeName;//the name
                     public string badgeDescription;//a quick description of it
                     public string badgeCost;//the cost of the badge
                 }