Esempio n. 1
0
 /** constructor
  */
 public TextAssetList(TextAssetList_MonoBehaviour a_list)
 {
     this.list = new System.Collections.Generic.Dictionary <string, UnityEngine.TextAsset>();
     for (int ii = 0; ii < a_list.tag_list.Length; ii++)
     {
         this.list.Add(a_list.tag_list[ii], a_list.textasset_list[ii]);
     }
 }
Esempio n. 2
0
        /** 追加。
         */
        public static UnityEngine.GameObject Add(UnityEngine.GameObject a_prefab, ResourceItem[] a_resource_list)
        {
            try{
                //textasset_list
                TextAssetList_MonoBehaviour t_textasset_list = a_prefab.AddComponent <TextAssetList_MonoBehaviour>();

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

            return(a_prefab);
        }