using System; using System.Collections.Generic; using UnityEngine; namespace SLZ.Marrow.Warehouse { [Serializable] public struct PackedAsset { public string title; public MarrowAsset marrowAsset; public List subAssets; public Type assetType; private string assetFieldName; public PackedAsset(string title, MarrowAsset marrowAsset, Type assetType, string assetFieldName) { this.title = title; this.marrowAsset = marrowAsset; this.subAssets = new List(); this.assetFieldName = assetFieldName; this.assetType = assetType; } public PackedAsset(string title, List subAssets, Type assetType, string assetFieldName) { this.title = title; this.marrowAsset = null; this.subAssets = subAssets; this.assetType = assetType; this.assetFieldName = assetFieldName; } public bool HasSubAssets() { return subAssets != null && subAssets.Count > 0; } } [Serializable] public struct PackedSubAsset { public string subTitle; public MarrowAsset subAsset; public PackedSubAsset(string subTitle, MarrowAsset subAsset) { this.subTitle = subTitle; this.subAsset = subAsset; } } }