/// <inheritdoc/> public override void AddKey(string key) { if (m_ItemsMap.ContainsKey(key)) { return; } m_ItemsMap[key] = new AssetTableItemData(); }
/// <inheritdoc/> public override void ReplaceKey(string key, string newKey) { AssetTableItemData id; if (m_ItemsMap.TryGetValue(key, out id)) { m_ItemsMap.Remove(key); } else { id = new AssetTableItemData(); } m_ItemsMap[newKey] = id; }
/// <summary> /// Maps the asset to the key for this LocaleId. /// </summary> /// <param name="assetKey">The key to map the asset to.</param> /// <param name="assetGuid">The guid of the asset. The asset will also need to be controlled by the Addressables system to be found.</param> public virtual void AddAsset(string assetKey, string assetGuid) { AssetTableItemData id; if (!m_ItemsMap.TryGetValue(assetKey, out id)) { id = new AssetTableItemData() { key = assetKey }; m_ItemsMap[assetKey] = id; } id.GuidHash = Hash128.Parse(assetGuid); }