Beispiel #1
0
        public TObject GetAsset(AddressableAssetTableT <TObject> table)
        {
            var foundIndex = m_Assets.FindIndex(o => o.Key == table.LocaleIdentifier.Code);

            if (foundIndex == -1)
            {
                var     guid  = table.GetGuidFromKey(Key);
                TObject asset = null;
                if (!string.IsNullOrEmpty(guid))
                {
                    asset = GetAssetFromCache(guid);
                    m_Assets.Add(new KeyValuePair <string, TObject>(table.LocaleIdentifier.Code, asset));
                }
                return(asset);
            }
            return(m_Assets[foundIndex].Value);
        }