using System; using UnityEngine; using System.Linq; using System.Collections.Generic; using Object = UnityEngine.Object; namespace I2.Loc { public partial class LanguageSourceData { #region Assets public void UpdateAssetDictionary() { Assets.RemoveAll(x => x == null); mAssetDictionary = Assets.Distinct() .GroupBy(o => o.name) .ToDictionary(g => g.Key, g => g.First()); } public Object FindAsset( string Name ) { if (Assets!=null) { if (mAssetDictionary==null || mAssetDictionary.Count!=Assets.Count) { UpdateAssetDictionary(); } Object obj; if (mAssetDictionary.TryGetValue(Name, out obj)) { return obj; } //for (int i=0, imax=Assets.Length; i