Update HotReload

This commit is contained in:
2026-03-28 12:54:41 +07:00
parent f2173d2c73
commit a4f2654d0b
278 changed files with 2027 additions and 1896 deletions
@@ -43,6 +43,18 @@ namespace SingularityGroup.HotReload {
public string generalInfo;
}
public class BugReport {
public string reportId;
public string label;
public string title;
public string description;
public string email;
public string hotReloadVersion;
public string unityVersion;
public string operatingSystemVersionInfo;
public string hwId;
}
static class RequestHelper {
internal const ushort defaultPort = 33242;
internal const string defaultServerHost = "127.0.0.1";
@@ -50,6 +62,7 @@ namespace SingularityGroup.HotReload {
"https://d2tc55zjhw51ly.cloudfront.net/releases/latest/changelog-zh.json" :
"https://d2tc55zjhw51ly.cloudfront.net/releases/latest/changelog.json";
static readonly string defaultOrigin = GetProjectRoot();
const string BugReportLambdaURL = "https://api.unityhotreload.com";
public static string origin { get; private set; } = defaultOrigin;
static string GetProjectRoot() {
@@ -328,7 +341,16 @@ namespace SingularityGroup.HotReload {
return null;
}
}
internal static async Task<string> SubmitBugReport(BugReport bugReport) {
var body = SerializeRequestBody(bugReport);
var resp = await PostJson(BugReportLambdaURL + "/report", body, int.MaxValue);
if (resp.statusCode != HttpStatusCode.OK) {
return $"Failed submitting bug report with status code {resp.statusCode}";
}
return null;
}
internal static async Task RequestEditorEventWithRetry(Stat stat, EditorExtraData extraData = null) {
if (MultiplayerPlaymodeHelper.IsClone) {
return;