diff --git a/Assets/AddressableAssetsData/link.xml b/Assets/AddressableAssetsData/link.xml deleted file mode 100644 index 45cee415c..000000000 --- a/Assets/AddressableAssetsData/link.xml +++ /dev/null @@ -1,533 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Assets/AddressableAssetsData/link.xml.meta b/Assets/AddressableAssetsData/link.xml.meta deleted file mode 100644 index 0ecab1db7..000000000 --- a/Assets/AddressableAssetsData/link.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 53058fb900d71f24f8c7402f538ecae1 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/com.unity3d.player/PrivacyActivity.java b/Assets/Plugins/Android/com.unity3d.player/PrivacyActivity.java index b03d1e5a8..4732c3b22 100644 --- a/Assets/Plugins/Android/com.unity3d.player/PrivacyActivity.java +++ b/Assets/Plugins/Android/com.unity3d.player/PrivacyActivity.java @@ -9,6 +9,10 @@ import android.os.Bundle; import android.webkit.WebView; public class PrivacyActivity extends Activity implements DialogInterface.OnClickListener { + // WebView 和 Dialog 引用,用于资源管理 + private WebView webView; + private AlertDialog privacyDialog; + // 隐私协议内容 final String privacyContext = "" + "

提示

" + @@ -44,15 +48,16 @@ public class PrivacyActivity extends Activity implements DialogInterface.OnClick // 显示隐私协议对话框 private void ShowPrivacyDialog() { - WebView webView = new WebView(this); + webView = new WebView(this); webView.loadData(privacyContext, "text/html", "utf-8"); - AlertDialog.Builder privacyDialog = new AlertDialog.Builder(this); - privacyDialog.setCancelable(false); - privacyDialog.setView(webView); - privacyDialog.setTitle("隐私政策"); - privacyDialog.setNegativeButton("拒绝", this); - privacyDialog.setPositiveButton("同意", this); - privacyDialog.create().show(); + AlertDialog.Builder builder = new AlertDialog.Builder(this); + builder.setCancelable(false); + builder.setView(webView); + builder.setTitle("隐私政策"); + builder.setNegativeButton("拒绝", this); + builder.setPositiveButton("同意", this); + privacyDialog = builder.create(); + privacyDialog.show(); } @Override @@ -89,4 +94,39 @@ public class PrivacyActivity extends Activity implements DialogInterface.OnClick SharedPreferences prefs = this.getSharedPreferences("PlayerPrefs", MODE_PRIVATE); return prefs.getBoolean("PrivacyAcceptedKey", false); } + + @Override + protected void onPause() { + super.onPause(); + // 暂停 WebView 以节省资源 + if (webView != null) { + webView.onPause(); + } + } + + @Override + protected void onResume() { + super.onResume(); + // 恢复 WebView + if (webView != null) { + webView.onResume(); + } + } + + @Override + protected void onDestroy() { + super.onDestroy(); + // 关闭对话框 + if (privacyDialog != null && privacyDialog.isShowing()) { + privacyDialog.dismiss(); + privacyDialog = null; + } + // 显式销毁 WebView 释放资源,防止内存泄漏 + if (webView != null) { + webView.onPause(); + webView.removeAllViews(); + webView.destroy(); + webView = null; + } + } } diff --git a/Assets/Plugins/Android/gradleTemplate.properties b/Assets/Plugins/Android/gradleTemplate.properties deleted file mode 100644 index 870468097..000000000 --- a/Assets/Plugins/Android/gradleTemplate.properties +++ /dev/null @@ -1,8 +0,0 @@ -org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M -org.gradle.parallel=true -unityStreamingAssets=**STREAMING_ASSETS** -# Android Resolver Properties Start -android.useAndroidX=true -android.enableJetifier=true -# Android Resolver Properties End -**ADDITIONAL_PROPERTIES** diff --git a/Assets/Plugins/Android/gradleTemplate.properties.meta b/Assets/Plugins/Android/gradleTemplate.properties.meta deleted file mode 100644 index 68b8d0b70..000000000 --- a/Assets/Plugins/Android/gradleTemplate.properties.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 4bd35721b7d123842aafa0d29c01e831 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/mainTemplate.gradle b/Assets/Plugins/Android/mainTemplate.gradle deleted file mode 100644 index 8d7976b06..000000000 --- a/Assets/Plugins/Android/mainTemplate.gradle +++ /dev/null @@ -1,41 +0,0 @@ -apply plugin: 'com.android.library' -**APPLY_PLUGINS** - -dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) -**DEPS**} - -android { - ndkPath "**NDKPATH**" - - compileSdkVersion **APIVERSION** - buildToolsVersion '**BUILDTOOLS**' - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - - defaultConfig { - minSdkVersion **MINSDKVERSION** - targetSdkVersion **TARGETSDKVERSION** - ndk { - abiFilters **ABIFILTERS** - } - versionCode **VERSIONCODE** - versionName '**VERSIONNAME**' - consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD** - } - - lintOptions { - abortOnError false - } - - aaptOptions { - noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ') - ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~" - }**PACKAGING_OPTIONS** -} -**IL_CPP_BUILD_SETUP** -**SOURCE_BUILD_SETUP** -**EXTERNAL_SOURCES** diff --git a/Assets/Plugins/Android/mainTemplate.gradle.meta b/Assets/Plugins/Android/mainTemplate.gradle.meta deleted file mode 100644 index 7958c288b..000000000 --- a/Assets/Plugins/Android/mainTemplate.gradle.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 83d8f678dc6ffdc44af3506282c87090 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/settingsTemplate.gradle b/Assets/Plugins/Android/settingsTemplate.gradle deleted file mode 100644 index 939fa3d5f..000000000 --- a/Assets/Plugins/Android/settingsTemplate.gradle +++ /dev/null @@ -1,23 +0,0 @@ -pluginManagement { - repositories { - **ARTIFACTORYREPOSITORY** - gradlePluginPortal() - google() - mavenCentral() - } -} - -include ':launcher', ':unityLibrary' -**INCLUDES** - -dependencyResolutionManagement { - repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) - repositories { - **ARTIFACTORYREPOSITORY** - google() - mavenCentral() - flatDir { - dirs "${project(':unityLibrary').projectDir}/libs" - } - } -} diff --git a/Assets/Plugins/Android/settingsTemplate.gradle.meta b/Assets/Plugins/Android/settingsTemplate.gradle.meta deleted file mode 100644 index 010878976..000000000 --- a/Assets/Plugins/Android/settingsTemplate.gradle.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 664e1f7a8d968ff49a6e36f996232a89 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Prefabs/Bubbles/Bubble.prefab b/Assets/Prefabs/Bubbles/Bubble.prefab index 3db8b2444..79c4e9f27 100644 --- a/Assets/Prefabs/Bubbles/Bubble.prefab +++ b/Assets/Prefabs/Bubbles/Bubble.prefab @@ -164,7 +164,8 @@ MonoBehaviour: databaseActions: {fileID: 11400000, guid: de78232a60d74f6459e57e5606304209, type: 2} defaultAppearancesTags: - step - defaultDisappearancesTags: [] + defaultDisappearancesTags: + - fade defaultBehaviorsTags: [] defaultTagsMode: 0 --- !u!114 &107040131454302588 diff --git a/Assets/Scripts/Framework/LogKit/LogKit.cs b/Assets/Scripts/Framework/LogKit/LogKit.cs index 4a38cc780..593299b40 100644 --- a/Assets/Scripts/Framework/LogKit/LogKit.cs +++ b/Assets/Scripts/Framework/LogKit/LogKit.cs @@ -30,7 +30,7 @@ namespace AibisDream.Kit [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] private static void Initialize() { -#if !UNITY_EDITOR +#if !UNITY_EDITOR && !UNITY_ANDROID && !UNITY_IOS if (_isInitialized) return; diff --git a/Assets/Scripts/UI/Cursor/CursorManager.cs b/Assets/Scripts/UI/Cursor/CursorManager.cs index a7d216da2..6ecc50ac4 100644 --- a/Assets/Scripts/UI/Cursor/CursorManager.cs +++ b/Assets/Scripts/UI/Cursor/CursorManager.cs @@ -42,7 +42,7 @@ namespace AibisDream // CameraKit.Instance.uiCamera, out var worldPos); // 判断当前要用什么样的指针 - _cursor.rectTransform.position = Input.mousePosition; + // _cursor.rectTransform.position = Input.mousePosition; var cursorState = CheckCursorState(); _cursor.sprite = GetCursorSprite(cursorState); diff --git a/Assets/Scripts/UI/DialogUI/Bubbles/Bubble.cs b/Assets/Scripts/UI/DialogUI/Bubbles/Bubble.cs index 215d73bf0..d807b4b9b 100644 --- a/Assets/Scripts/UI/DialogUI/Bubbles/Bubble.cs +++ b/Assets/Scripts/UI/DialogUI/Bubbles/Bubble.cs @@ -121,7 +121,7 @@ namespace AibisDream public void ShowLine(string line) { - _typewriter.ShowText(""); + _typewriter.TextAnimator.SetText(""); gameObject.SetActive(true); HandleLayout(line); _typewriter.ShowText(line); diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index d3b2ddaef..867389cf5 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -133,7 +133,7 @@ PlayerSettings: vulkanEnableLateAcquireNextImage: 0 vulkanEnableCommandBufferRecycling: 1 loadStoreDebugModeEnabled: 0 - bundleVersion: 0.3.3.36-20251224-022043 + bundleVersion: 0.3.3.50-20251224-211503 preloadedAssets: - {fileID: 11400000, guid: 0fb2bc2476953fc43a74f0ab8879077c, type: 2} metroInputSource: 0 @@ -163,7 +163,7 @@ PlayerSettings: iPhone: 0 tvOS: 0 overrideDefaultApplicationIdentifier: 1 - AndroidBundleVersionCode: 2 + AndroidBundleVersionCode: 15 AndroidMinSdkVersion: 22 AndroidTargetSdkVersion: 0 AndroidPreferredInstallLocation: 1 @@ -247,18 +247,18 @@ PlayerSettings: templateDefaultScene: Assets/Scenes/SampleScene.unity useCustomMainManifest: 1 useCustomLauncherManifest: 0 - useCustomMainGradleTemplate: 1 + useCustomMainGradleTemplate: 0 useCustomLauncherGradleManifest: 0 useCustomBaseGradleTemplate: 0 - useCustomGradlePropertiesTemplate: 1 + useCustomGradlePropertiesTemplate: 0 useCustomGradleSettingsTemplate: 0 useCustomProguardFile: 0 AndroidTargetArchitectures: 2 AndroidTargetDevices: 0 AndroidSplashScreenScale: 0 androidSplashScreen: {fileID: 0} - AndroidKeystoreName: - AndroidKeyaliasName: + AndroidKeystoreName: "D:/\u827E\u6BD4\u65AF\u4E4B\u68A6\u7D20\u6750\u4E2D\u5FC3/\u5BC6\u94A5/aibis-release-key.keystore" + AndroidKeyaliasName: aibis-release AndroidEnableArmv9SecurityFeatures: 0 AndroidBuildApkPerCpuArchitecture: 0 AndroidTVCompatibility: 0 @@ -266,7 +266,7 @@ PlayerSettings: AndroidEnableTango: 0 androidEnableBanner: 1 androidUseLowAccuracyLocation: 0 - androidUseCustomKeystore: 0 + androidUseCustomKeystore: 1 m_AndroidBanners: - width: 320 height: 180