|
|
@@ -15,22 +15,13 @@ public sealed class AppSettingsWindow : EditorWindow
|
|
|
private string addressError;
|
|
|
private Vector2 scrollPosition;
|
|
|
private bool showTestUrlHelp = false;
|
|
|
- private bool showUsageHelp = false;
|
|
|
+ private bool showUsageHelp = true;
|
|
|
private bool showS3Settings;
|
|
|
[NonSerialized] private string s3Bucket, s3Region, s3AccessKey, s3SecretKey, s3SessionToken;
|
|
|
|
|
|
private const string TestUrlExample = @"<key>TestUserID</key>
|
|
|
<string>https://example.com/test/</string>";
|
|
|
|
|
|
- private const string UsageExample = @"Hot Patch startup flow:
|
|
|
-Launch -> Extract original resources -> Compare manifests -> Download changed resources -> Load DLL
|
|
|
--> Automatically call AppRuntimes.Initialization() in the patch -> Open the configured game scene.
|
|
|
-
|
|
|
-In the Editor, Launch initializes AppRuntimes.Sources.Editor after the game scene loads and becomes active.
|
|
|
-The Editor initialization call and Sources assembly are excluded from Player builds.
|
|
|
-Initialization runs CheckVersion() in the background; the game does not need to call it again.
|
|
|
-Use 资源构建/一键打包资源 to generate original StreamingAssets and export both versions to Build/HotUpdate/AllRes_<timestamp>.";
|
|
|
-
|
|
|
[MenuItem("AppSettings/Open Settings")]
|
|
|
public static void Open()
|
|
|
{
|
|
|
@@ -40,7 +31,11 @@ Use 资源构建/一键打包资源 to generate original StreamingAssets and exp
|
|
|
window.Show();
|
|
|
}
|
|
|
|
|
|
- private void OnEnable() => LoadSettings();
|
|
|
+ private void OnEnable()
|
|
|
+ {
|
|
|
+ showUsageHelp = true;
|
|
|
+ LoadSettings();
|
|
|
+ }
|
|
|
|
|
|
private void LoadSettings()
|
|
|
{
|
|
|
@@ -221,18 +216,12 @@ Use 资源构建/一键打包资源 to generate original StreamingAssets and exp
|
|
|
}
|
|
|
|
|
|
EditorGUILayout.Space(8);
|
|
|
- showUsageHelp = EditorGUILayout.Foldout(showUsageHelp, "AppRuntimes Usage", true);
|
|
|
+ showUsageHelp = EditorGUILayout.Foldout(showUsageHelp, "使用注意事项", true);
|
|
|
if (showUsageHelp)
|
|
|
{
|
|
|
EditorGUILayout.HelpBox(
|
|
|
- "1. Fill in the settings above and click Save. Enter AppAddress as plain text; it is encrypted when saved.\n" +
|
|
|
- "2. The hot patch loader automatically calls Initialization() in the patch assembly and runs CheckVersion() in the background." +
|
|
|
- " The game does not need to call either method again.",
|
|
|
- MessageType.Info);
|
|
|
- DrawExample(UsageExample, string.Empty);
|
|
|
- EditorGUILayout.HelpBox(
|
|
|
- "AppRuntimes.Log always outputs in the Editor. On iOS, add a Boolean EnableUnityLog entry to Info.plist and" +
|
|
|
- " set it to YES to enable logging. It defaults to NO when absent. Logging is disabled by default on other platforms.",
|
|
|
+ "1. 订阅 AppRuntimesEvents.OnPlatformOpen 事件,在回调中停止播放单机游戏的背景音乐。打开 WebView 时会触发该事件。\n\n" +
|
|
|
+ "2. 操作步骤:Save >>> 一键打包资源 >>> 上传资源",
|
|
|
MessageType.Info);
|
|
|
}
|
|
|
}
|