diff --git a/ClassLibrary2/CommanderPortraitLoader.cs b/ClassLibrary2/CommanderPortraitLoader.cs index b081239..eb31891 100644 --- a/ClassLibrary2/CommanderPortraitLoader.cs +++ b/ClassLibrary2/CommanderPortraitLoader.cs @@ -14,197 +14,61 @@ using HBS.Collections; using BattleTech.Data; using Newtonsoft.Json.Linq; +using Newtonsoft.Json; namespace CommanderPortraitLoader { - [HarmonyPatch(typeof(RenderedPortraitResult), "get_Item")] - public static class RenderedPortraitResult_get_Item_Patch { - static void Postfix(RenderedPortraitResult __instance, ref Texture2D __result) { - Logger.LogLine("RenderedPortraitResult Postfix start"); - if (!string.IsNullOrEmpty(__instance.settings.Description.Icon)) { - Logger.LogLine("Icon Found"); - try { - Texture2D texture2D = new Texture2D(2, 2); - byte[] array = File.ReadAllBytes("mods/CommanderPortraitLoader/Portraits/" + __instance.settings.Description.Icon + ".png"); - texture2D.LoadImage(array); - __result = texture2D; - } - catch (Exception e) { - Logger.LogError(e); - } - } - } - } - - [HarmonyPatch(typeof(SGCharacterCreationWidget), "CreatePilot")] - public static class SGCharacterCreationWidget_CreatePilot_Patch { - static void Postfix(ref SGCharacterCreationWidget __instance, ref Pilot __result) { - Logger.LogLine("CreatePilot Postfix start"); - try { - if (!string.IsNullOrEmpty(__result.pilotDef.Description.Icon)) { - PilotDef pilotDef = new PilotDef(new HumanDescriptionDef(__result.Description.Id, __result.Description.Callsign, __result.Description.FirstName, __result.Description.LastName, - __result.Description.Callsign, __result.Description.Gender, Faction.NoFaction, __result.Description.Age, __result.Description.Details, __result.pilotDef.Description.Icon), - __result.Gunnery, __result.Piloting, __result.Guts, __result.Guts, 0, 3, false, 0, string.Empty, CommanderPortraitLoader.GetAbilities(__result.Gunnery, __result.Piloting, __result.Guts, __result.Guts), AIPersonality.Undefined, 0, __result.pilotDef.PilotTags, 0, 0); - pilotDef.PortraitSettings = null; - pilotDef.SetHiringHallStats(true, false, true, false); - __result = new Pilot(pilotDef, "commander", false); - Logger.LogLine("Pilot modified"); - } - } - catch (Exception e) { - Logger.LogError(e); - } - } - } - - [HarmonyPatch(typeof(PilotDef), "GetPortraitSprite")] - public static class PilotDef_GetPortraitSprite_Patch { - static void Postfix(ref PilotDef __instance, ref Sprite __result) { - Logger.LogLine("GetPortraitSprite Postfix start"); - try { - if (__result == null) { - Texture2D texture2D2 = new Texture2D(2, 2); - byte[] data = File.ReadAllBytes("mods/CommanderPortraitLoader/Portraits/" + __instance.Description.Icon + ".png"); - texture2D2.LoadImage(data); - Sprite sprite = new Sprite(); - sprite = Sprite.Create(texture2D2, new Rect(0f, 0f, (float)texture2D2.width, (float)texture2D2.height), new Vector2(0f, 0f), 100f); - __result = sprite; - } - } - catch (Exception e) { - Logger.LogError(e); - } - } - } - - [HarmonyPatch(typeof(PilotDef), "GetPortraitSpriteThumb")] - public static class PilotDef_GetPortraitSpriteThumb_Patch { - static void Postfix(ref PilotDef __instance, ref Sprite __result) { - Logger.LogLine("GetPortraitSpriteThumb Postfix start"); - try { - if (__result == null) { - Texture2D texture2D2 = new Texture2D(2, 2); - byte[] data = File.ReadAllBytes("mods/CommanderPortraitLoader/Portraits/" + __instance.Description.Icon + ".png"); - texture2D2.LoadImage(data); - Sprite sprite = new Sprite(); - sprite = Sprite.Create(texture2D2, new Rect(0f, 0f, (float)texture2D2.width, (float)texture2D2.height), new Vector2(0f, 0f), 100f); - __result = CommanderPortraitLoader.DownsampleSprite(sprite); - } - } - catch (Exception e) { - Logger.LogError(e); - } - } - } - - /*[HarmonyPatch(typeof(SGCharacterCreationPortraitSelectionPanel), "PopulateList")] - public static class SGCharacterCreationPortraitSelectionPanel_PopulateList_Patch { - static void Postfix(SGCharacterCreationPortraitSelectionPanel __instance) { - Logger.LogLine("PopulateList Prefix start"); - - try { - PortraitSettings settings = new PortraitSettings(); - string json; - using (StreamReader r = new StreamReader("mods/CommanderPortraitLoader/Portraits/PortraitPreset_Kara.json")) { - json = r.ReadToEnd(); - } - settings.FromJSON(json); - DataManager data = LazySingletonBehavior.Instance.Game.DataManager; - KeyValuePair pair = new KeyValuePair(settings.Description.Id, settings); - data.PortraitSettings.Add(pair); - } - catch (Exception e) { - - Logger.LogError(e); - } - } - }*/ - - [HarmonyPatch(typeof(VersionManifestUtilities), "LoadDefaultManifest")] - public static class VersionManifestUtilitiesPatch { - // ReSharper disable once RedundantAssignment - public static void Postfix(ref VersionManifest __result) { - try { - var addendum = VersionManifestUtilities.ManifestFromCSV("mods/CommanderPortraitLoader/VersionManifest.csv"); - foreach (var entry in addendum.Entries) { - __result.AddOrUpdate(entry.Id, entry.FilePath, entry.Type, entry.AddedOn, entry.AssetBundleName, entry.IsAssetBundlePersistent); - } - } - catch (Exception e) { - Logger.LogError(e); - } - - } - } - public static class CommanderPortraitLoader { public static void Init() { var harmony = HarmonyInstance.Create("de.morphyum.CommanderPortraitLoader"); harmony.PatchAll(Assembly.GetExecutingAssembly()); CreateJsons(); + AddOrUpdateJSONToManifest(); } - - - // Token: 0x0600564D RID: 22093 RVA: 0x0023F158 File Offset: 0x0023D358 - public static Sprite DownsampleSprite(Sprite oldSprite) { - Texture2D texture = oldSprite.texture; - RenderTexture temporary = RenderTexture.GetTemporary(texture.width / 2, texture.height / 2, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.sRGB); - RenderTexture temporary2 = RenderTexture.GetTemporary(texture.width / 4, texture.height / 4, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.sRGB); - Graphics.Blit(texture, temporary); - Graphics.Blit(temporary, temporary2); - Texture2D texture2D = new Texture2D(texture.width / 4, texture.height / 4, TextureFormat.ARGB32, false); - RenderTexture.active = temporary2; - texture2D.ReadPixels(new Rect(0f, 0f, (float)texture2D.width, (float)texture2D.height), 0, 0); - texture2D.Apply(false, true); - Texture2D texture2D2 = texture2D; - texture2D2.name = texture2D2.name + texture.name + " Thumb"; - RenderTexture.ReleaseTemporary(temporary); - RenderTexture.ReleaseTemporary(temporary2); - return Sprite.Create(texture2D, new Rect(0f, 0f, (float)texture2D.width, (float)texture2D.height), new Vector2(0.5f, 0.5f), 100f, 0u, SpriteMeshType.FullRect, Vector4.zero); - } - - public static List GetAbilities(int gunnery, int piloting, int guts, int tactics) { - List list = new List(); - SimPilotProgressionConstantsDef progression = LazySingletonBehavior.Instance.Game.Simulation.Constants.Progression; - int abilityLevel = gunnery; - int abilityLevel2 = piloting; - int abilityLevel3 = guts; - int abilityLevel4 = tactics; - list.AddRange(CommanderPortraitLoader.GetAbilityDefsForSkill(progression.GunnerySkills, abilityLevel)); - list.AddRange(CommanderPortraitLoader.GetAbilityDefsForSkill(progression.PilotingSkills, abilityLevel2)); - list.AddRange(CommanderPortraitLoader.GetAbilityDefsForSkill(progression.GutsSkills, abilityLevel3)); - list.AddRange(CommanderPortraitLoader.GetAbilityDefsForSkill(progression.TacticsSkills, abilityLevel4)); - return list; - } - - public static List GetAbilityDefsForSkill(string[][] abilityDefConsts, int abilityLevel) { - List list = new List(); - for (int i = 0; i < abilityLevel; i++) { - list.AddRange(abilityDefConsts[i]); + public static void CreateJsons() { + try { + string filePath = "mods/CommanderPortraitLoader/Portraits/"; + DirectoryInfo d1 = new DirectoryInfo(filePath); + FileInfo[] f1 = d1.GetFiles("*.png"); + foreach (FileInfo info in f1) { + if (!File.Exists(info.FullName.Replace(".png", ".json"))) { + CustomPreset preset = new CustomPreset(); + preset.isCommander = true; + preset.Description = new CustomDescription(); + preset.Description.Id = info.Name.Replace(".png", ""); + preset.Description.Icon = info.Name.Replace(".png", ""); + preset.Description.Name = info.Name.Replace(".png", ""); + preset.Description.Details = ""; + JObject o = (JObject)JToken.FromObject(preset); + using (StreamWriter writer = new StreamWriter(filePath + info.Name.Replace(".png", ".json"), false)) { + writer.WriteLine(o); + } + } + } + } + catch (Exception e) { + Logger.LogError(e); } - return list; } - public static void CreateJsons() { + private static void AddOrUpdateJSONToManifest() { try { string filePath = "mods/CommanderPortraitLoader/Portraits/"; + VersionManifest manifest = VersionManifestUtilities.ManifestFromCSV("mods/CommanderPortraitLoader/VersionManifest.csv"); DirectoryInfo d1 = new DirectoryInfo(filePath); - FileInfo[] f1 = d1.GetFiles("*.png"); + FileInfo[] f1 = d1.GetFiles("*.json"); + CustomPreset preset = new CustomPreset(); foreach (FileInfo info in f1) { - CustomPreset preset = new CustomPreset(); - preset.isCommander = true; - preset.Description = new CustomDescription(); - preset.Description.Id = info.Name.Replace(".png", ""); - preset.Description.Icon = info.Name.Replace(".png", ""); - preset.Description.Name = info.Name.Replace(".png", ""); - preset.Description.Details = ""; - JObject o = (JObject)JToken.FromObject(preset); - using (StreamWriter writer = new StreamWriter(filePath + info.Name.Replace(".png", ".json"), true)) { - writer.WriteLine(o); + using (StreamReader r = new StreamReader(info.FullName)) { + string json = r.ReadToEnd(); + preset = JsonConvert.DeserializeObject(json); } + manifest.AddOrUpdate(preset.Description.Id, info.FullName, "PortraitSettings", DateTime.Now, null, false); } - } catch(Exception e) { + VersionManifestUtilities.ManifestToCSV(manifest, "mods/CommanderPortraitLoader/VersionManifest.csv"); + } + catch (Exception e) { Logger.LogError(e); } } @@ -232,36 +96,4 @@ public static void CreateJsons() { public float RecoveryChance; }*/ - public class CustomPreset - { - public CustomDescription Description; - public bool isCommander; - - } - - public class CustomDescription { - public string Id; - public string Name; - public string Details; - public string Icon; - - } - public class Logger { - public static void LogError(Exception ex) { - string filePath = "mods/CommanderPortraitLoader/Log.txt"; - using (StreamWriter writer = new StreamWriter(filePath, true)) { - writer.WriteLine("Message :" + ex.Message + "
" + Environment.NewLine + "StackTrace :" + ex.StackTrace + - "" + Environment.NewLine + "Date :" + DateTime.Now.ToString()); - writer.WriteLine(Environment.NewLine + "-----------------------------------------------------------------------------" + Environment.NewLine); - } - } - - public static void LogLine(String line) { - string filePath = "mods/CommanderPortraitLoader/Log.txt"; - using (StreamWriter writer = new StreamWriter(filePath, true)) { - writer.WriteLine(line + Environment.NewLine + "Date :" + DateTime.Now.ToString()); - writer.WriteLine(Environment.NewLine + "-----------------------------------------------------------------------------" + Environment.NewLine); - } - } - } } \ No newline at end of file diff --git a/ClassLibrary2/CommanderPortraitLoader.csproj b/ClassLibrary2/CommanderPortraitLoader.csproj index dab319d..69356ca 100644 --- a/ClassLibrary2/CommanderPortraitLoader.csproj +++ b/ClassLibrary2/CommanderPortraitLoader.csproj @@ -36,6 +36,10 @@ ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\BATTLETECH\BattleTech_Data\Managed\Assembly-CSharp.dll + + ..\packages\CsvHelper.7.1.0\lib\net45\CsvHelper.dll + True + ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll True @@ -54,6 +58,10 @@ + + + + diff --git a/ClassLibrary2/Helper.cs b/ClassLibrary2/Helper.cs new file mode 100644 index 0000000..4de2175 --- /dev/null +++ b/ClassLibrary2/Helper.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Harmony; +using BattleTech; +using System.Reflection; +using System.IO; +using BattleTech.Portraits; +using UnityEngine; +using UnityEngine.Rendering; +using BattleTech.UI; +using HBS; +using HBS.Collections; +using BattleTech.Data; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json; + +namespace CommanderPortraitLoader { + public class Helper{ + // Token: 0x0600564D RID: 22093 RVA: 0x0023F158 File Offset: 0x0023D358 + public static Sprite DownsampleSprite(Sprite oldSprite) { + Texture2D texture = oldSprite.texture; + RenderTexture temporary = RenderTexture.GetTemporary(texture.width / 2, texture.height / 2, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.sRGB); + RenderTexture temporary2 = RenderTexture.GetTemporary(texture.width / 4, texture.height / 4, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.sRGB); + Graphics.Blit(texture, temporary); + Graphics.Blit(temporary, temporary2); + Texture2D texture2D = new Texture2D(texture.width / 4, texture.height / 4, TextureFormat.ARGB32, false); + RenderTexture.active = temporary2; + texture2D.ReadPixels(new Rect(0f, 0f, (float)texture2D.width, (float)texture2D.height), 0, 0); + texture2D.Apply(false, true); + Texture2D texture2D2 = texture2D; + texture2D2.name = texture2D2.name + texture.name + " Thumb"; + RenderTexture.ReleaseTemporary(temporary); + RenderTexture.ReleaseTemporary(temporary2); + return Sprite.Create(texture2D, new Rect(0f, 0f, (float)texture2D.width, (float)texture2D.height), new Vector2(0.5f, 0.5f), 100f, 0u, SpriteMeshType.FullRect, Vector4.zero); + } + + public static List GetAbilities(int gunnery, int piloting, int guts, int tactics) { + List list = new List(); + SimPilotProgressionConstantsDef progression = LazySingletonBehavior.Instance.Game.Simulation.Constants.Progression; + int abilityLevel = gunnery; + int abilityLevel2 = piloting; + int abilityLevel3 = guts; + int abilityLevel4 = tactics; + list.AddRange(GetAbilityDefsForSkill(progression.GunnerySkills, abilityLevel)); + list.AddRange(GetAbilityDefsForSkill(progression.PilotingSkills, abilityLevel2)); + list.AddRange(GetAbilityDefsForSkill(progression.GutsSkills, abilityLevel3)); + list.AddRange(GetAbilityDefsForSkill(progression.TacticsSkills, abilityLevel4)); + return list; + } + + public static List GetAbilityDefsForSkill(string[][] abilityDefConsts, int abilityLevel) { + List list = new List(); + for (int i = 0; i < abilityLevel; i++) { + list.AddRange(abilityDefConsts[i]); + } + return list; + } + } +} \ No newline at end of file diff --git a/ClassLibrary2/HolderClasses.cs b/ClassLibrary2/HolderClasses.cs new file mode 100644 index 0000000..8583a33 --- /dev/null +++ b/ClassLibrary2/HolderClasses.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Harmony; +using BattleTech; +using System.Reflection; +using System.IO; +using BattleTech.Portraits; +using UnityEngine; +using UnityEngine.Rendering; +using BattleTech.UI; +using HBS; +using HBS.Collections; +using BattleTech.Data; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json; + +namespace CommanderPortraitLoader { + public class CustomPreset { + public CustomDescription Description = new CustomDescription(); + public bool isCommander; + + } + + public class CustomDescription { + public string Id; + public string Name; + public string Details; + public string Icon; + + } +} \ No newline at end of file diff --git a/ClassLibrary2/Logger.cs b/ClassLibrary2/Logger.cs new file mode 100644 index 0000000..c0e3bf1 --- /dev/null +++ b/ClassLibrary2/Logger.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Harmony; +using BattleTech; +using System.Reflection; +using System.IO; +using BattleTech.Portraits; +using UnityEngine; +using UnityEngine.Rendering; +using BattleTech.UI; +using HBS; +using HBS.Collections; +using BattleTech.Data; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json; + +namespace CommanderPortraitLoader { + public class Logger { + public static void LogError(Exception ex) { + string filePath = "mods/CommanderPortraitLoader/Log.txt"; + using (StreamWriter writer = new StreamWriter(filePath, true)) { + writer.WriteLine("Message :" + ex.Message + "
" + Environment.NewLine + "StackTrace :" + ex.StackTrace + + "" + Environment.NewLine + "Date :" + DateTime.Now.ToString()); + writer.WriteLine(Environment.NewLine + "-----------------------------------------------------------------------------" + Environment.NewLine); + } + } + + public static void LogLine(String line) { + string filePath = "mods/CommanderPortraitLoader/Log.txt"; + using (StreamWriter writer = new StreamWriter(filePath, true)) { + writer.WriteLine(line + Environment.NewLine + "Date :" + DateTime.Now.ToString()); + writer.WriteLine(Environment.NewLine + "-----------------------------------------------------------------------------" + Environment.NewLine); + } + } + } +} \ No newline at end of file diff --git a/ClassLibrary2/Patch.cs b/ClassLibrary2/Patch.cs new file mode 100644 index 0000000..dc31e35 --- /dev/null +++ b/ClassLibrary2/Patch.cs @@ -0,0 +1,139 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Harmony; +using BattleTech; +using System.Reflection; +using System.IO; +using BattleTech.Portraits; +using UnityEngine; +using UnityEngine.Rendering; +using BattleTech.UI; +using HBS; +using HBS.Collections; +using BattleTech.Data; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json; + +namespace CommanderPortraitLoader { + [HarmonyPatch(typeof(RenderedPortraitResult), "get_Item")] + public static class RenderedPortraitResult_get_Item_Patch { + static void Postfix(RenderedPortraitResult __instance, ref Texture2D __result) { + Logger.LogLine("RenderedPortraitResult Postfix start"); + if (!string.IsNullOrEmpty(__instance.settings.Description.Icon)) { + Logger.LogLine("Icon Found"); + try { + Texture2D texture2D = new Texture2D(2, 2); + byte[] array = File.ReadAllBytes("mods/CommanderPortraitLoader/Portraits/" + __instance.settings.Description.Icon + ".png"); + texture2D.LoadImage(array); + __result = texture2D; + } + catch (Exception e) { + Logger.LogError(e); + } + } + } + } + + [HarmonyPatch(typeof(SGCharacterCreationWidget), "CreatePilot")] + public static class SGCharacterCreationWidget_CreatePilot_Patch { + static void Postfix(ref SGCharacterCreationWidget __instance, ref Pilot __result) { + Logger.LogLine("CreatePilot Postfix start"); + try { + if (!string.IsNullOrEmpty(__result.pilotDef.Description.Icon)) { + PilotDef pilotDef = new PilotDef(new HumanDescriptionDef(__result.Description.Id, __result.Description.Callsign, __result.Description.FirstName, __result.Description.LastName, + __result.Description.Callsign, __result.Description.Gender, Faction.NoFaction, __result.Description.Age, __result.Description.Details, __result.pilotDef.Description.Icon), + __result.Gunnery, __result.Piloting, __result.Guts, __result.Guts, 0, 3, false, 0, string.Empty, Helper.GetAbilities(__result.Gunnery, __result.Piloting, __result.Guts, __result.Guts), AIPersonality.Undefined, 0, __result.pilotDef.PilotTags, 0, 0); + pilotDef.PortraitSettings = null; + pilotDef.SetHiringHallStats(true, false, true, false); + __result = new Pilot(pilotDef, "commander", false); + Logger.LogLine("Pilot modified"); + } + } + catch (Exception e) { + Logger.LogError(e); + } + } + } + + [HarmonyPatch(typeof(PilotDef), "GetPortraitSprite")] + public static class PilotDef_GetPortraitSprite_Patch { + static void Postfix(ref PilotDef __instance, ref Sprite __result) { + Logger.LogLine("GetPortraitSprite Postfix start"); + try { + if (__result == null) { + Texture2D texture2D2 = new Texture2D(2, 2); + byte[] data = File.ReadAllBytes("mods/CommanderPortraitLoader/Portraits/" + __instance.Description.Icon + ".png"); + texture2D2.LoadImage(data); + Sprite sprite = new Sprite(); + sprite = Sprite.Create(texture2D2, new Rect(0f, 0f, (float)texture2D2.width, (float)texture2D2.height), new Vector2(0f, 0f), 100f); + __result = sprite; + } + } + catch (Exception e) { + Logger.LogError(e); + } + } + } + + [HarmonyPatch(typeof(PilotDef), "GetPortraitSpriteThumb")] + public static class PilotDef_GetPortraitSpriteThumb_Patch { + static void Postfix(ref PilotDef __instance, ref Sprite __result) { + Logger.LogLine("GetPortraitSpriteThumb Postfix start"); + try { + if (__result == null) { + Texture2D texture2D2 = new Texture2D(2, 2); + byte[] data = File.ReadAllBytes("mods/CommanderPortraitLoader/Portraits/" + __instance.Description.Icon + ".png"); + texture2D2.LoadImage(data); + Sprite sprite = new Sprite(); + sprite = Sprite.Create(texture2D2, new Rect(0f, 0f, (float)texture2D2.width, (float)texture2D2.height), new Vector2(0f, 0f), 100f); + __result = Helper.DownsampleSprite(sprite); + } + } + catch (Exception e) { + Logger.LogError(e); + } + } + } + + /*[HarmonyPatch(typeof(SGCharacterCreationPortraitSelectionPanel), "PopulateList")] + public static class SGCharacterCreationPortraitSelectionPanel_PopulateList_Patch { + static void Postfix(SGCharacterCreationPortraitSelectionPanel __instance) { + Logger.LogLine("PopulateList Prefix start"); + + try { + PortraitSettings settings = new PortraitSettings(); + string json; + using (StreamReader r = new StreamReader("mods/CommanderPortraitLoader/Portraits/PortraitPreset_Kara.json")) { + json = r.ReadToEnd(); + } + settings.FromJSON(json); + DataManager data = LazySingletonBehavior.Instance.Game.DataManager; + KeyValuePair pair = new KeyValuePair(settings.Description.Id, settings); + data.PortraitSettings.Add(pair); + } + catch (Exception e) { + + Logger.LogError(e); + } + } + }*/ + + [HarmonyPatch(typeof(VersionManifestUtilities), "LoadDefaultManifest")] + public static class VersionManifestUtilitiesPatch { + // ReSharper disable once RedundantAssignment + public static void Postfix(ref VersionManifest __result) { + try { + var addendum = VersionManifestUtilities.ManifestFromCSV("mods/CommanderPortraitLoader/VersionManifest.csv"); + foreach (var entry in addendum.Entries) { + __result.AddOrUpdate(entry.Id, entry.FilePath, entry.Type, entry.AddedOn, entry.AssetBundleName, entry.IsAssetBundlePersistent); + } + } + catch (Exception e) { + Logger.LogError(e); + } + + } + } +} \ No newline at end of file diff --git a/ClassLibrary2/packages.config b/ClassLibrary2/packages.config index 07e3593..ff91d23 100644 --- a/ClassLibrary2/packages.config +++ b/ClassLibrary2/packages.config @@ -1,4 +1,5 @@  + \ No newline at end of file