Example #1
0
        public static ItemDataEntry Create(string itemID, string desc)
        {
            ItemDataEntry created = ScriptableObject.CreateInstance <ItemDataEntry>();

            created.itemID = itemID;
            created.itemBasicDescription = desc;
            created.itemThumbnail        = null;
            created.itemImage            = null;
            return(created);
        }
Example #2
0
 public void CreateFromJsonArray(string[] jsonArr)
 {
     while (ItemList.Count < jsonArr.Length)
     {
         ItemDataEntry newEntry = ItemDataEntry.Create("NewItem");
         AddSubAsset(newEntry);
         ItemList.Add(newEntry);
     }
     for (int i = 0; i < jsonArr.Length; i++)
     {
         JsonUtility.FromJsonOverwrite(jsonArr[i], ItemList[i]);
     }
 }