Modifying my Inventory System.

Hi, a long while ago I created my own inventory system. There were some major flaws with the system however. One of them being that magazines and bullets are not treated like regular items so they must be stored in separate inventory pages.

Here is my Item class:

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

[System.Serializable]
public class ItemData {
    /*
    Item Name: The name of the Item. Example: M1911 Handgun.
    Item ID: Gives the Item a unique number so that it is not confused with other Items.
    Item Description: The text that will appear in the description box when examining the Item in the inventory.
    Stackable: Can this item be stacked?
    Stack Size: The amount of this item in the stack.
    Max Stack Size: How many of this item can fit in a singe stack.
    */
    public string itemName = "", itemID = "", itemDescription = "";
    public bool stackable = false;
    public int stackSize = 1, maxStackSize = 1;
    /*
    Item Type: What type of item is this?
    */
    public ItemType itemType;
    public enum ItemType {
        primary,
        secondary,
        melee,
        tool,
        consumable,
        other
    }
    /*
    Accepted Magazines: A list of IDs of magazines the gun accepts.
    Current Magazine: The current magazine the gun is holding.
    */
    public List<string> acceptedMagazines = new List<string>();
    public MagazineData currentMagazine;
}

Here is my Magazine class:

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

[System.Serializable]
public class MagazineData {
    /*
    Magazine Name: The name of the magazine. Example: 100 Round 5.56 Drum.
    Magazine ID: Gives the magazine a unique number so that it is not confused with other magazines.
    Magazine Description: The text that will appear in the description box when examining the magazine in the inventory.
    */
    public string magazineName = "", magazineID = "", magazineDescription = "";
    /*
    Max Bullets: The maximum number of bullets this magazine can hold:
    */
    public int maxBullets = 10;
    /*
    Accepted Bullets: A list of IDs of bullets the magazine accepts.
    Stored Bullets: The bullets currently inside the magazine.
    */
    public List<string> acceptedBullets = new List<string>();
    public List<BulletData> storedBullets = new List<string>();
}

And here is my bullet class:

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

[System.Serializable]
public class BulletData {
    /*
    Bullet Name: The name of the bullet. Example: 9mm.
    Bullet ID: Gives the bullet a unique number so that it is not confused with other bullets.
    Bullet Description: The text that will appear in the description box when examining the bullet in the inventory.
    Stack Size: The number of this bullet the player has.
    */
    public string bulletName = "", bulletID = "", bulletDescription = "";
    public int stackSize = 0;
    /*
    Base Damage: The base damage of the bullet.
    Armor Penetration: The extent to which the bullet can pierce armor. 0.0 means it can't pierce armor while 1.0 means it ignores armor.
    Initial Power: The amount of force applied to the bullet object once fired:
    */
    public float baseDamage = 0.0f, armorPenetration = 0.0f, initialPower = 0.0f;
}

Does anyone know how I can modify this system so that I don’t have to store them in separate inventories?

What exactly were the issues?

Because regular items, bullets and magazines are created using different classes, they can’t be treated the same.

The way my system works is having an inventory page for regular items and equipment, and two additional pages, one for magazines and the other for bullets. I was wondering if there is any way to simplify the system so that a single inventory slot on the UI can be hold bullets, magazines, or regular items as if they were all part of the same class.