/// <summary> /// 调试输出 /// </summary> /// <param name="obj"></param> public void DebugLoader(TextureLoadObject obj) { StringBuilder sb = new StringBuilder(); sb.AppendFormat("{0}/{1} {2}", obj.index, obj.total, obj.complete); sb.AppendLine(); sb.AppendFormat("{0}", obj.current.filename); sb.AppendLine(); Debug.Log(sb.ToString()); }
void Start() { loadObj = default(TextureLoadObject); loadList = new List <TextureObject>(); texList = new List <TextureObject>(); texMap = new Dictionary <string, Texture2D>(); loadObj.index = loadObj.total = 0; loadObj.loader = this; for (int i = 0; i < numThread; i++) { StartCoroutine(Load_Texture()); } LoadDirectory(Path.Combine(Application.streamingAssetsPath, streaming_relpath)); }