示例#1
0
 public void Load()
 {
     loading = true;
     if (!string.IsNullOrEmpty(name) && name != "empty")
     {
         string path = string.Empty;
         path = CDirectory.MakeCachePath(name);
         if (!File.Exists(path))
         {
             path = CDirectory.MakeOtherStreamingPath(name);
         }
         if (this.name.EndsWith(".txt"))
         {
             this.text = new StringBuilder(File.ReadAllText(path));
         }
         else
         {
             this.asset_bundle = AssetBundle.CreateFromFile(path);
         }
         //this.complete = true;
     }
     if (!string.IsNullOrEmpty(name))
     {
         this.complete = true;
     }
 }