Exemple #1
0
            public void AllDelete()
            {
                int length = mLoadResouceList.Count;

                for (int i = 0; i < length; i++)
                {
                    RES_OBJ res = mLoadResouceList[i];
                    GameObject.Destroy(res.resObject.asset);
                    mLoadResouceList.Remove(res);
                }

                mLoadResouceList.Clear();
            }
Exemple #2
0
            public void Delete(string name)
            {
                int length = mLoadResouceList.Count;

                for (int i = 0; i < length; i++)
                {
                    if (mLoadResouceList[i].resouceName.Equals(name.ToString()))
                    {
                        RES_OBJ res = mLoadResouceList[i];
                        GameObject.Destroy(res.resObject.asset);
                        mLoadResouceList.Remove(res);
                        break;
                    }
                }
            }
Exemple #3
0
            public Object GetResouce(string name)
            {
                int length = mLoadResouceList.Count;

                Debug.Log(length.ToString() + "Items(GetResouce)");

                for (int i = 0; i < length; i++)
                {
                    if (mLoadResouceList[i].resouceName.Equals(name.ToString()))
                    {
                        RES_OBJ res = mLoadResouceList[i];

                        return(res.resObject.asset);
                    }
                }
                return(null);
            }
Exemple #4
0
            /// <summary>
            /// 非同期でリソースの読み込みをします。
            /// </summary>
            /// <param name="name"></param>
            public void Load(string name)
            {
                RES_OBJ res = new RES_OBJ();

                res.Id        = mResouceCnt;
                res.resObject = Resources.LoadAsync(name);

                char[]   split   = { '/' };
                string[] resNmae = name.Split(split);
                int      length  = resNmae.Length - 1;

                res.resouceName = resNmae[length];

                Debug.Log(res.resouceName.ToString());

                mLoadResouceList.Add(res);

                mResouceCnt++;
            }