diff --git a/Toggle NotificationsProject/TNTools/UI/AssetsLoader.cs b/Toggle NotificationsProject/TNTools/UI/AssetsLoader.cs index 900bd44..cc240bb 100644 --- a/Toggle NotificationsProject/TNTools/UI/AssetsLoader.cs +++ b/Toggle NotificationsProject/TNTools/UI/AssetsLoader.cs @@ -7,14 +7,16 @@ internal class AssetsLoader { internal static Texture2D LoadIcon(string path) { - Texture2D imageTexture = AssetManager.GetAsset("togglenotifications/images/" + path + ".png"); + string fullPath = "com.github.cvusmo.togglenotifications/images/" + path + ".png"; + Debug.Log("Trying to load asset from path: " + fullPath); + Texture2D imageTexture = AssetManager.GetAsset(fullPath); if (imageTexture == null) { Debug.LogError("Failed to load image texture from path: " + path); Debug.Log("Full resource path: " + Application.dataPath + "/" + path); Debug.Log("Expected resource type: Texture2D"); - Debug.Log("Full path: " + Application.dataPath + "/togglenotifications/images/" + path + ".png"); + Debug.Log("Full path: " + Application.dataPath + "com.github.cvusmo.togglenotifications/images/" + path + ".png"); } return imageTexture; } diff --git a/Toggle NotificationsProject/ToggleNotificationsPlugin.cs b/Toggle NotificationsProject/ToggleNotificationsPlugin.cs index e7f532b..9e3903e 100644 --- a/Toggle NotificationsProject/ToggleNotificationsPlugin.cs +++ b/Toggle NotificationsProject/ToggleNotificationsPlugin.cs @@ -59,6 +59,7 @@ public override void OnInitialized() TNBaseSettings.Init(SettingsPath); base.OnInitialized(); + Debug.Log("SpaceWarpMetadata.ModID value: " + SpaceWarpMetadata.ModID); Instance = this; Logger = base.Logger; @@ -68,12 +69,13 @@ public override void OnInitialized() messageCenter = game.Messages; MainUI = new ToggleNotificationsUI(this, _isGUIenabled, messageCenter); + Debug.Log("SpaceWarpMetadata.ModID value: " + SpaceWarpMetadata.ModID); // Register Flight AppBar button Appbar.RegisterAppButton( "Toggle Notifications", ToolbarFlightButtonID, - AssetManager.GetAsset($"{SpaceWarpMetadata.ModID}/images/icon.png"), + AssetManager.GetAsset($"{SpaceWarpMetadata.ModID}/images/icon.png"), //changed isOpen => { ToggleButton(isOpen, isOpen); diff --git a/Toggle NotificationsProject/toggle_notifications.csproj b/Toggle NotificationsProject/toggle_notifications.csproj index 01c66a1..7558fa1 100644 --- a/Toggle NotificationsProject/toggle_notifications.csproj +++ b/Toggle NotificationsProject/toggle_notifications.csproj @@ -1,3 +1,4 @@ + netstandard2.0 @@ -16,7 +17,11 @@ icon.ico https://github.com/cvusmo/Toggle-Notifications icon.png - https://github.com/cvusmo/Toggle-Notifications + + KSP2-mods + + + True @@ -31,30 +36,18 @@ - - - + - + + C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program 2\KSP2_x64_Data\Managed\Assembly-CSharp.dll + true + false - - - True - True - Settings.settings - - - - - PublicSettingsSingleFileGenerator - Settings.Designer.cs - - - + \ No newline at end of file diff --git a/toggle_notifications/swinfo.json b/toggle_notifications/swinfo.json index d98045f..45ff491 100644 --- a/toggle_notifications/swinfo.json +++ b/toggle_notifications/swinfo.json @@ -5,8 +5,6 @@ "description": "Toggle Notifications on and off", "license": "MIT", "source": "https://github.com/cvusmo/Toggle-Notifications", - "version": "0.2.5", - "spec": "1.3", "version": "0.3.0", "spec": "1.3", "version_check": "https://raw.githubusercontent.com/cvusmo/Toggle-Notifications/master/toggle_notifications/swinfo.json", @@ -14,13 +12,13 @@ { "id": "com.github.x606.spacewarp", "version": { - "min": "1.1.1", + "min": "1.4.*", "max": "*" } } ], "ksp2_version": { - "min": "0.1.0", + "min": "0.1.4", "max": "*" } } \ No newline at end of file