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

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

            return(a_prefab);
        }