[Add] Hot Reload

This commit is contained in:
2026-02-27 03:16:18 +07:00
parent 5067cb51a1
commit b37579153b
431 changed files with 43054 additions and 1 deletions
@@ -0,0 +1,42 @@
using UnityEditor;
using UnityEngine;
namespace SingularityGroup.HotReload.Editor {
internal class OpenDialogueButton : IGUIComponent {
public readonly string text;
public readonly string url;
public readonly string title;
public readonly string message;
public readonly string ok;
public readonly string cancel;
public OpenDialogueButton(string text, string url, string title, string message, string ok, string cancel) {
this.text = text;
this.url = url;
this.title = title;
this.message = message;
this.ok = ok;
this.cancel = cancel;
}
public void OnGUI() {
Render(text, url, title, message, ok, cancel);
}
public static void Render(string text, string url, string title, string message, string ok, string cancel) {
if (GUILayout.Button(new GUIContent(text.StartsWith(" ") ? text : " " + text))) {
if (EditorUtility.DisplayDialog(title, message, ok, cancel)) {
Application.OpenURL(url);
}
}
}
public static void RenderRaw(Rect rect, string text, string url, string title, string message, string ok, string cancel, GUIStyle style = null) {
if (GUI.Button(rect, new GUIContent(text.StartsWith(" ") ? text : " " + text), style ?? GUI.skin.button)) {
if (EditorUtility.DisplayDialog(title, message, ok, cancel)) {
Application.OpenURL(url);
}
}
}
}
}
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 97ca8174f0514e8e9ee5d4be26ed8078
timeCreated: 1674416481
AssetOrigin:
serializedVersion: 1
productId: 254358
packageName: Hot Reload | Edit Code Without Compiling
packageVersion: 1.13.17
assetPath: Packages/com.singularitygroup.hotreload/Editor/Window/GUI/Buttons/OpenDialogueButton.cs
uploadId: 870414
@@ -0,0 +1,29 @@
using UnityEditor;
using UnityEngine;
namespace SingularityGroup.HotReload.Editor {
internal class OpenURLButton : IGUIComponent {
public readonly string text;
public readonly string url;
public OpenURLButton(string text, string url) {
this.text = text;
this.url = url;
}
public void OnGUI() {
Render(text, url);
}
public static void Render(string text, string url) {
if (GUILayout.Button(new GUIContent(text.StartsWith(" ") ? text : " " + text))) {
Application.OpenURL(url);
}
}
public static void RenderRaw(Rect rect, string text, string url, GUIStyle style = null) {
if (GUI.Button(rect, new GUIContent(text.StartsWith(" ") ? text : " " + text), style ?? GUI.skin.button)) {
Application.OpenURL(url);
}
}
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: ef12252fc9d1f9f438cbd34cf8f7364b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 254358
packageName: Hot Reload | Edit Code Without Compiling
packageVersion: 1.13.17
assetPath: Packages/com.singularitygroup.hotreload/Editor/Window/GUI/Buttons/OpenURLButton.cs
uploadId: 870414