Exemple #1
0
 /** constructor
  */
 public FontList(FontList_MonoBehaviour a_list)
 {
     this.list = new System.Collections.Generic.Dictionary <string, UnityEngine.Font>();
     for (int ii = 0; ii < a_list.tag_list.Length; ii++)
     {
         this.list.Add(a_list.tag_list[ii], a_list.font_list[ii]);
     }
 }
        /** 追加。
         */
        public static UnityEngine.GameObject Add(UnityEngine.GameObject a_prefab, ResourceItem[] a_resource_list)
        {
            try{
                //font_list
                FontList_MonoBehaviour t_font_list = a_prefab.AddComponent <FontList_MonoBehaviour>();

                t_font_list.tag_list  = new string[a_resource_list.Length];
                t_font_list.font_list = new UnityEngine.Font[a_resource_list.Length];
                for (int ii = 0; ii < t_font_list.font_list.Length; ii++)
                {
                    t_font_list.tag_list[ii]  = a_resource_list[ii].tag;
                    t_font_list.font_list[ii] = Fee.EditorTool.Utility.LoadAsset <UnityEngine.Font>(a_resource_list[ii].path);
                }
            }catch (System.Exception t_exception) {
                UnityEngine.Debug.LogError(t_exception.Message);
            }

            return(a_prefab);
        }