public static void SetTitleIcon(string titleId, UITexture targetTex) { if (titleId != null) { GameWebAPI.RespDataMA_TitleMaster.TitleM titleM = TitleDataMng.GetDictionaryTitleM()[int.Parse(titleId)]; if (titleM != null) { string imagePath = TitleDataMng.GetImagePath(titleM); TitleIconCacheBuffer.Instance().LoadAndCacheObj(imagePath, delegate(UnityEngine.Object obj) { if (obj != null) { Texture2D mainTexture = obj as Texture2D; targetTex.mainTexture = mainTexture; } }); } } }