热更系统修改并测试

This commit is contained in:
2025-11-04 16:19:53 +08:00
parent db6f5d147e
commit 4ba496506d
25 changed files with 477 additions and 2122 deletions

View File

@@ -1,3 +1,17 @@
{
"name": "GameScripts.Main"
}
"name": "GameScripts.Main",
"rootNamespace": "",
"references": [
"GUID:921b262766d31374c8fd93ad67954b9c",
"GUID:63f032f8696ad5b4e99c26f7a9f89060"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@@ -5,12 +5,7 @@ public class GameStart : MonoBehaviour
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
Debug.Log("GameStart");
GamePreload.Inst.Test("call by GameStart");
}
}

View File

@@ -0,0 +1,9 @@
using UnityEngine;
public class GamePreload : Singleton<GamePreload>
{
public void Test(string msg)
{
Debug.Log($"GamePreload.Test:{msg}");
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: f70a842d4d8919e41a34b7ad7012e9ff

View File

@@ -14,6 +14,7 @@ public class PatchWindow : MonoBehaviour
PatchEvent.OnStatusUpdate += OnStatusUpdate;
PatchEvent.OnProgressUpdate += OnProgressUpdate;
PatchEvent.OnDownloadSizeUpdate += OnDownloadSizeUpdate;
PatchEvent.OnClosePatchWindow += OnClosePatchWindow;
}
private void OnDestroy()
{
@@ -39,4 +40,8 @@ public class PatchWindow : MonoBehaviour
if (downloadSizeText != null)
downloadSizeText.text = sizeText;
}
private void OnClosePatchWindow()
{
gameObject.SetActive(false);
}
}