Rebuild the game as a single code-driven scene with a package-folder pack source

- One empty scene; App builds the canvas, safe-area layout and a shared 5x6
  Grid in code. Pages (Intro, Main, Choose, Play, Account, Settings) replace
  5 scenes, 5 prefabs and the per-cell spawner/display components.
- Packs: the game reads Rhyculator/package/ (with All files access) or the
  app folder, like a plugged-in USB stick. Zips stay where they are and are
  extracted to a cache keyed by name/size/mtime; folders are read directly.
  Scans run every second on a background thread. Old songs/ imports and inbox
  zips are migrated automatically.
- Download packs by 8-char code from the new pack website, or via
  rhyculator://pack/<code> links; opened/shared zips go into the package folder.
- Play: pause/resume/retry, auto-pause on background, combo and progress bar;
  judging and scoring unchanged. Choose page fits 9:16 screens; empty state,
  pack delete. Android back key handled everywhere.
- Slimming: removed TextMesh Pro, unused 2D/Timeline/VisualScripting/etc.
  packages and modules, scene template, unused sprites; menu theme wav (20MB)
  -> ogg (2.3MB). Build profile replaced by explicit settings in BuildAndroid.
- Tests: PackLibrary/PackReader/migration/serializer tests (39 passing).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
SahikandClaude Opus 5.5 committed 2026-10-24 14:18:54 +08:00
1 parent 6d5f66ac6a
commit ddd5fdc28b
295 files changed
+3854 -82126

No files matched your search

+15 -3
View File
@@ -3,16 +3,21 @@
自訂的 main manifest(Player Settings > Custom Main Manifest)
內容以 Unity 產生的版本為基礎,多加了「開啟 / 分享 zip 給本 app」的 intent-filter,
讓玩家能用檔案管理員或瀏覽器直接把曲包送進遊戲;
activity 換成 RhyculatorActivity(繼承 UnityPlayerGameActivity),負責把收到的 zip 複製到收件匣
activity 換成 RhyculatorActivity(繼承 UnityPlayerGameActivity),負責把收到的 zip 複製到曲包資料夾;
儲存權限讓曲包資料夾可以放在手機根目錄的 Rhyculator/package(Android 11+ 為「所有檔案存取權」);
rhyculator://pack/<code> 是曲包網站「在遊戲中下載」的連結
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" tools:ignore="ScopedStorage" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="29" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" />
<uses-feature android:glEsVersion="0x00030000" />
<uses-feature android:name="android.hardware.vulkan.version" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" />
<application android:appCategory="game" android:enableOnBackInvokedCallback="false" android:extractNativeLibs="true">
<application android:appCategory="game" android:enableOnBackInvokedCallback="false" android:extractNativeLibs="true" android:requestLegacyExternalStorage="true">
<meta-data android:name="unity.splash-mode" android:value="0" />
<meta-data android:name="unity.splash-enable" android:value="True" />
<meta-data android:name="unity.launch-fullscreen" android:value="True" />
@@ -21,7 +26,7 @@
<meta-data android:name="unity.auto-report-fully-drawn" android:value="true" />
<meta-data android:name="unity.strip-engine-code" android:value="true" />
<meta-data android:name="unity.auto-set-game-state" android:value="true" />
<activity android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density" android:enabled="true" android:exported="true" android:hardwareAccelerated="false" android:launchMode="singleTask" android:name="com.rhyculator.RhyculatorActivity" android:resizeableActivity="true" android:screenOrientation="fullUser" android:theme="@style/BaseUnityGameActivityTheme">
<activity android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density" android:enabled="true" android:exported="true" android:hardwareAccelerated="false" android:launchMode="singleTask" android:name="com.rhyculator.RhyculatorActivity" android:resizeableActivity="true" android:screenOrientation="userPortrait" android:theme="@style/BaseUnityGameActivityTheme">
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.MAIN" />
@@ -45,6 +50,13 @@
<data android:mimeType="application/x-zip-compressed" />
<data android:mimeType="application/octet-stream" />
</intent-filter>
<!-- 曲包網站的「在遊戲中下載」 -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="rhyculator" android:host="pack" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<meta-data android:name="android.app.lib_name" android:value="game" />
<meta-data android:name="WindowManagerPreference:FreeformWindowSize" android:value="@string/FreeformWindowSize_maximize" />