public void SetSubtreeAsset(string subtreeID, BTAsset subtreeAsset) { if (!string.IsNullOrEmpty(subtreeID)) { AssetIDPair subtree = m_subtrees.Find(obj => obj.assetID == subtreeID); if (subtree != null) { subtree.asset = subtreeAsset; } else { subtree = new AssetIDPair(); subtree.asset = subtreeAsset; subtree.assetID = subtreeID; m_subtrees.Add(subtree); } } }
public BTAsset GetSubtreeAsset(string subtreeID) { AssetIDPair subtree = m_subtrees.Find(obj => obj.assetID == subtreeID); return(subtree != null ? subtree.asset : null); }