Skip to content

Commit

Permalink
Merge pull request #90 from ZiwKerman/v2.0-overhaul
Browse files Browse the repository at this point in the history
V2 0 overhaul RC2
  • Loading branch information
ZiwKerman committed Apr 22, 2016
2 parents 5d03e6a + a01ba01 commit 8538e35
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
Binary file modified InfernalRobotics/.vs/InfernalRobotics/InfernalRobotics.scgdat
Binary file not shown.
23 changes: 14 additions & 9 deletions InfernalRobotics/InfernalRobotics/Gui/UIAssetsLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ public IEnumerator LoadBundle(string location)
{
yield return www;
IRAssetBundle = www.assetBundle;

LoadBundleAssets();
IRAssetBundle.Unload(false);

//IRAssetBundle.Unload(false);
}
}

Expand Down Expand Up @@ -174,27 +176,30 @@ public void Start()
{
var assemblyFile = Assembly.GetExecutingAssembly().Location;
var bundlePath = "file://" + assemblyFile.Replace(new FileInfo(assemblyFile).Name, "").Replace("\\","/") + "../AssetBundles/";
var filePath = assemblyFile.Replace(new FileInfo(assemblyFile).Name, "") + "../AssetBundles/";
//var filePath = assemblyFile.Replace(new FileInfo(assemblyFile).Name, "") + "../AssetBundles/";

//Logger.Log("Loading bundles from BundlePath: " + bundlePath, Logger.Level.Debug);
Logger.Log("Loading bundles from BundlePath: " + bundlePath, Logger.Level.Debug);

//need to clean cache
//Caching.CleanCache();
Caching.CleanCache();

//StartCoroutine(LoadBundle(bundlePath + "ir_ui_objects.ksp"));
StartCoroutine(LoadBundle(bundlePath + "ir_ui_objects.ksp"));

if(IRAssetBundle==null)
/*if(IRAssetBundle==null)
{
Logger.Log("Loading bundles from filePath: " + filePath, Logger.Level.Debug);
LoadBundleFromDisk(filePath + "ir_ui_objects.ksp"); //bundle must be uncompressed for this function to work
}

*/
}

public void OnDestroy()
{
Logger.Log("Unloading bundle", Logger.Level.Debug);
IRAssetBundle.Unload(false);
if(IRAssetBundle)
{
Logger.Log("Unloading bundle", Logger.Level.Debug);
IRAssetBundle.Unload(false);
}
}

}
Expand Down

0 comments on commit 8538e35

Please sign in to comment.