using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class ArtefactInventory : ScriptableObject { public static List artefactList = new List(); private static bool exists = false; public static void addA(Artefact a) { //check if duplicate in the list exists = false; foreach (Artefact x in artefactList) { if (x.artefactID == a.artefactID) exists = true; } if ( exists == false) { artefactList.Add(a); } } }