Update unity

This commit is contained in:
Lncvrt committed 2025-10-14 11:32:29 -07:00
1 parent 331511e9e1
commit 374a8c4173
5 files changed
+24 -20

No files matched your search

+1 -1
View File
@@ -66,5 +66,5 @@
"explorer.fileNesting.patterns": { "explorer.fileNesting.patterns": {
"*.sln": "*.csproj" "*.sln": "*.csproj"
}, },
"dotnet.defaultSolution": "happybob-bdc.sln" "dotnet.defaultSolution": "happybob-bdc.slnx"
} }
+16 -12
View File
@@ -13,6 +13,7 @@ public class BazookaManager : MonoBehaviour
{ {
["version"] = "0" ["version"] = "0"
}; };
private JObject lastSaveFile = new();
void Awake() void Awake()
{ {
@@ -32,17 +33,11 @@ public class BazookaManager : MonoBehaviour
} }
} }
void OnApplicationQuit() void Update()
{ {
Save(); if (Instance == null && !firstLoadDone) return;
} if (!JToken.DeepEquals(saveFile, lastSaveFile)) Save();
lastSaveFile = saveFile;
void OnApplicationPause(bool pause)
{
if (pause)
{
Save();
}
} }
public void Load() public void Load()
@@ -59,7 +54,11 @@ public class BazookaManager : MonoBehaviour
try try
{ {
var tempSaveFile = JObject.Parse(File.ReadAllText(path)); var tempSaveFile = JObject.Parse(File.ReadAllText(path));
if (tempSaveFile != null) saveFile = tempSaveFile; if (tempSaveFile != null)
{
saveFile = tempSaveFile;
lastSaveFile = tempSaveFile;
}
} }
catch catch
{ {
@@ -76,7 +75,12 @@ public class BazookaManager : MonoBehaviour
try try
{ {
var tempSaveFile = JObject.Parse(File.ReadAllText(Encoding.UTF8.GetString(Convert.FromBase64String(PlayerPrefs.GetString("saveFile", "e30="))))); var tempSaveFile = JObject.Parse(File.ReadAllText(Encoding.UTF8.GetString(Convert.FromBase64String(PlayerPrefs.GetString("saveFile", "e30=")))));
if (tempSaveFile != null) saveFile = tempSaveFile; if (tempSaveFile != null)
{
saveFile = tempSaveFile;
lastSaveFile = tempSaveFile;
}
Debug.Log(tempSaveFile.ToString());
} }
catch catch
{ {
+1 -1
View File
@@ -10,7 +10,7 @@
"com.unity.2d.tilemap.extras": "5.0.1", "com.unity.2d.tilemap.extras": "5.0.1",
"com.unity.collab-proxy": "2.9.3", "com.unity.collab-proxy": "2.9.3",
"com.unity.ide.rider": "3.0.38", "com.unity.ide.rider": "3.0.38",
"com.unity.ide.visualstudio": "2.0.23", "com.unity.ide.visualstudio": "2.0.25",
"com.unity.inputsystem": "1.14.2", "com.unity.inputsystem": "1.14.2",
"com.unity.multiplayer.center": "1.0.0", "com.unity.multiplayer.center": "1.0.0",
"com.unity.nuget.newtonsoft-json": "3.2.1", "com.unity.nuget.newtonsoft-json": "3.2.1",
+4 -4
View File
@@ -95,7 +95,7 @@
"url": "https://packages.unity.com" "url": "https://packages.unity.com"
}, },
"com.unity.burst": { "com.unity.burst": {
"version": "1.8.24", "version": "1.8.25",
"depth": 2, "depth": 2,
"source": "registry", "source": "registry",
"dependencies": { "dependencies": {
@@ -140,11 +140,11 @@
"url": "https://packages.unity.com" "url": "https://packages.unity.com"
}, },
"com.unity.ide.visualstudio": { "com.unity.ide.visualstudio": {
"version": "2.0.23", "version": "2.0.25",
"depth": 0, "depth": 0,
"source": "registry", "source": "registry",
"dependencies": { "dependencies": {
"com.unity.test-framework": "1.1.9" "com.unity.test-framework": "1.1.31"
}, },
"url": "https://packages.unity.com" "url": "https://packages.unity.com"
}, },
@@ -272,7 +272,7 @@
} }
}, },
"com.unity.test-framework.performance": { "com.unity.test-framework.performance": {
"version": "3.1.0", "version": "3.2.0",
"depth": 2, "depth": 2,
"source": "registry", "source": "registry",
"dependencies": { "dependencies": {
+2 -2
View File
@@ -1,2 +1,2 @@
m_EditorVersion: 6000.2.6f2 m_EditorVersion: 6000.2.7f2
m_EditorVersionWithRevision: 6000.2.6f2 (4a4dcaec6541) m_EditorVersionWithRevision: 6000.2.7f2 (2b518236b676)