From 178338af66d8edf79b865f345264abb93065281d Mon Sep 17 00:00:00 2001
From: Ding Yuntian <1491671119@qq.com>
Date: Thu, 4 Sep 2025 15:29:44 +0800
Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Assets/AddressableAssetsData/link.xml | 538 ++++++++++++++++++
Assets/AddressableAssetsData/link.xml.meta | 7 +
.../Language/UIText/UIText Shared Data.asset | 10 +-
Assets/Language/UIText/UIText_en.asset | 8 +
Assets/Language/UIText/UIText_zh-Hans.asset | 11 +-
Assets/Resources/Art/Chapter/chapter4_mid.png | 3 +
.../Art/Chapter/chapter4_mid.png.meta | 153 +++++
Assets/Scenes/Persistence.unity | 170 +++++-
.../ScriptableObjects/SceneSO/Day1_mid.asset | 2 +-
Assets/Scripts/Game Loop/ChapterController.cs | 26 +-
Assets/Scripts/Game Loop/StorageSystem.cs | 19 +-
Assets/Scripts/Utility/ConstRef.cs | 8 +-
Assets/StreamingAssets/Config/chapter.json | 2 +-
.../StreamingAssets/Config/chapter.json.meta | 2 +-
ProjectSettings/ProjectSettings.asset | 2 +-
15 files changed, 933 insertions(+), 28 deletions(-)
create mode 100644 Assets/AddressableAssetsData/link.xml
create mode 100644 Assets/AddressableAssetsData/link.xml.meta
create mode 100644 Assets/Resources/Art/Chapter/chapter4_mid.png
create mode 100644 Assets/Resources/Art/Chapter/chapter4_mid.png.meta
diff --git a/Assets/AddressableAssetsData/link.xml b/Assets/AddressableAssetsData/link.xml
new file mode 100644
index 000000000..39281ead7
--- /dev/null
+++ b/Assets/AddressableAssetsData/link.xml
@@ -0,0 +1,538 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Assets/AddressableAssetsData/link.xml.meta b/Assets/AddressableAssetsData/link.xml.meta
new file mode 100644
index 000000000..fa3b9e552
--- /dev/null
+++ b/Assets/AddressableAssetsData/link.xml.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: c0cd97ce41dc6f84099d3f1f82320db1
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Language/UIText/UIText Shared Data.asset b/Assets/Language/UIText/UIText Shared Data.asset
index bef8e94b0..c79ea1284 100644
--- a/Assets/Language/UIText/UIText Shared Data.asset
+++ b/Assets/Language/UIText/UIText Shared Data.asset
@@ -192,7 +192,15 @@ MonoBehaviour:
m_Metadata:
m_Items: []
- m_Id: 48204049970003968
- m_Key: chose_chapter
+ m_Key: chapter_title
+ m_Metadata:
+ m_Items: []
+ - m_Id: 48548037998415872
+ m_Key: chapter_restart
+ m_Metadata:
+ m_Items: []
+ - m_Id: 48548407659204608
+ m_Key: chapter_continue
m_Metadata:
m_Items: []
m_Metadata:
diff --git a/Assets/Language/UIText/UIText_en.asset b/Assets/Language/UIText/UIText_en.asset
index 6cd12bb99..cdc5ab532 100644
--- a/Assets/Language/UIText/UIText_en.asset
+++ b/Assets/Language/UIText/UIText_en.asset
@@ -212,6 +212,14 @@ MonoBehaviour:
m_Localized: SELECT CHAPTER
m_Metadata:
m_Items: []
+ - m_Id: 48548037998415872
+ m_Localized: Restart
+ m_Metadata:
+ m_Items: []
+ - m_Id: 48548407659204608
+ m_Localized: Continue
+ m_Metadata:
+ m_Items: []
references:
version: 2
RefIds:
diff --git a/Assets/Language/UIText/UIText_zh-Hans.asset b/Assets/Language/UIText/UIText_zh-Hans.asset
index 3ecf2802f..38018114e 100644
--- a/Assets/Language/UIText/UIText_zh-Hans.asset
+++ b/Assets/Language/UIText/UIText_zh-Hans.asset
@@ -200,10 +200,19 @@ MonoBehaviour:
m_Localized: "\u9009\u62E9\u7AE0\u8282"
m_Metadata:
m_Items: []
+ - m_Id: 48548037998415872
+ m_Localized: "\u91CD\u65B0\u5F00\u59CB"
+ m_Metadata:
+ m_Items: []
+ - m_Id: 48548407659204608
+ m_Localized: "\u7EE7\u7EED\u6E38\u620F"
+ m_Metadata:
+ m_Items:
+ - rid: 7917695939544875419
references:
version: 2
RefIds:
- rid: 7917695939544875419
type: {class: SmartFormatTag, ns: UnityEngine.Localization.Metadata, asm: Unity.Localization}
data:
- m_Entries: 0010305847140000
+ m_Entries: 00103058471400000010f000857aac00
diff --git a/Assets/Resources/Art/Chapter/chapter4_mid.png b/Assets/Resources/Art/Chapter/chapter4_mid.png
new file mode 100644
index 000000000..b0b0d9dc4
--- /dev/null
+++ b/Assets/Resources/Art/Chapter/chapter4_mid.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1bf3f9d73d849148ccf2f219e9a6b894c40cd0f3eb9f662f55bfba73b79531d7
+size 153540
diff --git a/Assets/Resources/Art/Chapter/chapter4_mid.png.meta b/Assets/Resources/Art/Chapter/chapter4_mid.png.meta
new file mode 100644
index 000000000..e14957177
--- /dev/null
+++ b/Assets/Resources/Art/Chapter/chapter4_mid.png.meta
@@ -0,0 +1,153 @@
+fileFormatVersion: 2
+guid: 7715c89797cc6ca4e914b85f5524e9fd
+TextureImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 12
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ flipGreenChannel: 0
+ isReadable: 0
+ streamingMipmaps: 0
+ streamingMipmapsPriority: 0
+ vTOnly: 0
+ ignoreMipmapLimit: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapU: 1
+ wrapV: 1
+ wrapW: 1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 1
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 100
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 1
+ spriteTessellationDetail: -1
+ textureType: 8
+ textureShape: 1
+ singleChannelComponent: 0
+ flipbookRows: 1
+ flipbookColumns: 1
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ ignorePngGamma: 0
+ applyGammaDecoding: 0
+ swizzle: 50462976
+ cookieLightType: 0
+ platformSettings:
+ - serializedVersion: 3
+ buildTarget: DefaultTexturePlatform
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 3
+ buildTarget: WebGL
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 3
+ buildTarget: Standalone
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 3
+ buildTarget: Android
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 3
+ buildTarget: Server
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ physicsShape: []
+ bones: []
+ spriteID: 5e97eb03825dee720800000000000000
+ internalID: 0
+ vertices: []
+ indices:
+ edges: []
+ weights: []
+ secondaryTextures: []
+ nameFileIdTable: {}
+ mipmapLimitGroupName:
+ pSDRemoveMatte: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scenes/Persistence.unity b/Assets/Scenes/Persistence.unity
index 80e194c1d..a4d6ea0d5 100644
--- a/Assets/Scenes/Persistence.unity
+++ b/Assets/Scenes/Persistence.unity
@@ -11244,9 +11244,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: feee73ba51d6e1a4da81ed7f94ab4694, type: 3}
m_Name:
m_EditorClassIdentifier:
- runMode: 0
+ runMode: 1
firstTalkSo: {fileID: 11400000, guid: 2f763a2c04ecafb4981379b7363f9791, type: 2}
- testTalkSo: {fileID: 11400000, guid: 10601ce26230723479d875a630f15732, type: 2}
+ testTalkSo: {fileID: 11400000, guid: 68a9c1b8c5230454bb9498fd2ab5714b, type: 2}
saveFileName: "20250901_204445_PeipeiDay1_\u8BB0\u5FC6\u68C0\u67E5"
--- !u!1 &719273460
GameObject:
@@ -18691,7 +18691,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
- m_SizeDelta: {x: 0, y: 0}
+ m_SizeDelta: {x: 10, y: 10}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1340005159
MonoBehaviour:
@@ -37337,6 +37337,7 @@ GameObject:
- component: {fileID: 6145991584633056681}
- component: {fileID: 3264578095131055192}
- component: {fileID: 7317977928859878859}
+ - component: {fileID: 9006227265183306108}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
@@ -39835,6 +39836,7 @@ GameObject:
- component: {fileID: 9095867813134009746}
- component: {fileID: 2463214217156890611}
- component: {fileID: 4392705815853002647}
+ - component: {fileID: 9095867813134009747}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
@@ -44542,6 +44544,7 @@ GameObject:
- component: {fileID: 8707505610749617582}
- component: {fileID: 3960443440110788347}
- component: {fileID: 3482224582280766657}
+ - component: {fileID: 8707505610749617583}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
@@ -67045,6 +67048,46 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3762684500752322565}
m_CullTransparentMesh: 0
+--- !u!114 &8707505610749617583
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 3762684500752322565}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 56eb0353ae6e5124bb35b17aff880f16, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_StringReference:
+ m_TableReference:
+ m_TableCollectionName: GUID:994c69bf4b2403043bc9562f2d24ee56
+ m_TableEntryReference:
+ m_KeyId: 48548037998415872
+ m_Key:
+ m_FallbackState: 0
+ m_WaitForCompletion: 0
+ m_LocalVariables: []
+ m_FormatArguments: []
+ m_UpdateString:
+ m_PersistentCalls:
+ m_Calls:
+ - m_Target: {fileID: 3960443440110788347}
+ m_TargetAssemblyTypeName: TMPro.TMP_Text, Unity.TextMeshPro
+ m_MethodName: set_text
+ m_Mode: 0
+ m_Arguments:
+ m_ObjectArgument: {fileID: 0}
+ m_ObjectArgumentAssemblyTypeName:
+ m_IntArgument: 0
+ m_FloatArgument: 0
+ m_StringArgument:
+ m_BoolArgument: 0
+ m_CallState: 1
+ references:
+ version: 2
+ RefIds: []
--- !u!224 &8708001701131757713
RectTransform:
m_ObjectHideFlags: 0
@@ -68529,6 +68572,46 @@ RectTransform:
m_AnchoredPosition: {x: 109, y: -30}
m_SizeDelta: {x: 112, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &9006227265183306108
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 2122379497704210886}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 56eb0353ae6e5124bb35b17aff880f16, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_StringReference:
+ m_TableReference:
+ m_TableCollectionName: GUID:994c69bf4b2403043bc9562f2d24ee56
+ m_TableEntryReference:
+ m_KeyId: 48548407659204608
+ m_Key:
+ m_FallbackState: 0
+ m_WaitForCompletion: 0
+ m_LocalVariables: []
+ m_FormatArguments: []
+ m_UpdateString:
+ m_PersistentCalls:
+ m_Calls:
+ - m_Target: {fileID: 3264578095131055192}
+ m_TargetAssemblyTypeName: TMPro.TMP_Text, Unity.TextMeshPro
+ m_MethodName: set_text
+ m_Mode: 0
+ m_Arguments:
+ m_ObjectArgument: {fileID: 0}
+ m_ObjectArgumentAssemblyTypeName:
+ m_IntArgument: 0
+ m_FloatArgument: 0
+ m_StringArgument:
+ m_BoolArgument: 0
+ m_CallState: 1
+ references:
+ version: 2
+ RefIds: []
--- !u!1 &9023119066462756953
GameObject:
m_ObjectHideFlags: 0
@@ -68846,6 +68929,46 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2651289985545650710}
m_CullTransparentMesh: 0
+--- !u!114 &9095867813134009747
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 2651289985545650710}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 56eb0353ae6e5124bb35b17aff880f16, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_StringReference:
+ m_TableReference:
+ m_TableCollectionName: GUID:994c69bf4b2403043bc9562f2d24ee56
+ m_TableEntryReference:
+ m_KeyId: 48548407659204608
+ m_Key:
+ m_FallbackState: 0
+ m_WaitForCompletion: 0
+ m_LocalVariables: []
+ m_FormatArguments: []
+ m_UpdateString:
+ m_PersistentCalls:
+ m_Calls:
+ - m_Target: {fileID: 2463214217156890611}
+ m_TargetAssemblyTypeName: TMPro.TMP_Text, Unity.TextMeshPro
+ m_MethodName: set_text
+ m_Mode: 0
+ m_Arguments:
+ m_ObjectArgument: {fileID: 0}
+ m_ObjectArgumentAssemblyTypeName:
+ m_IntArgument: 0
+ m_FloatArgument: 0
+ m_StringArgument:
+ m_BoolArgument: 0
+ m_CallState: 1
+ references:
+ version: 2
+ RefIds: []
--- !u!114 &9119955190900555835
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -69083,6 +69206,7 @@ GameObject:
- component: {fileID: 8966469376725431833}
- component: {fileID: 2998571800363260992}
- component: {fileID: 8542944669709852834}
+ - component: {fileID: 9143392381470354611}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
@@ -69090,6 +69214,46 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
+--- !u!114 &9143392381470354611
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 9143392381470354610}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 56eb0353ae6e5124bb35b17aff880f16, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_StringReference:
+ m_TableReference:
+ m_TableCollectionName: GUID:994c69bf4b2403043bc9562f2d24ee56
+ m_TableEntryReference:
+ m_KeyId: 48548037998415872
+ m_Key:
+ m_FallbackState: 0
+ m_WaitForCompletion: 0
+ m_LocalVariables: []
+ m_FormatArguments: []
+ m_UpdateString:
+ m_PersistentCalls:
+ m_Calls:
+ - m_Target: {fileID: 2998571800363260992}
+ m_TargetAssemblyTypeName: TMPro.TMP_Text, Unity.TextMeshPro
+ m_MethodName: set_text
+ m_Mode: 0
+ m_Arguments:
+ m_ObjectArgument: {fileID: 0}
+ m_ObjectArgumentAssemblyTypeName:
+ m_IntArgument: 0
+ m_FloatArgument: 0
+ m_StringArgument:
+ m_BoolArgument: 0
+ m_CallState: 1
+ references:
+ version: 2
+ RefIds: []
--- !u!224 &9150678032829601296
RectTransform:
m_ObjectHideFlags: 0
diff --git a/Assets/ScriptableObjects/SceneSO/Day1_mid.asset b/Assets/ScriptableObjects/SceneSO/Day1_mid.asset
index a9f0d2958..e767e63e8 100644
--- a/Assets/ScriptableObjects/SceneSO/Day1_mid.asset
+++ b/Assets/ScriptableObjects/SceneSO/Day1_mid.asset
@@ -17,5 +17,5 @@ MonoBehaviour:
firstSceneName: ClinicOut
title: "\u5348\u4F11"
description: "\u51AC\u5929\u5230\u4E86"
- coverPic: {fileID: 0}
+ coverPic: {fileID: 21300000, guid: 7715c89797cc6ca4e914b85f5524e9fd, type: 3}
chapter: "\u51AC\u5929\u5230\u4E86"
diff --git a/Assets/Scripts/Game Loop/ChapterController.cs b/Assets/Scripts/Game Loop/ChapterController.cs
index 7d432d4f4..cbb251d0b 100644
--- a/Assets/Scripts/Game Loop/ChapterController.cs
+++ b/Assets/Scripts/Game Loop/ChapterController.cs
@@ -10,7 +10,7 @@ namespace AibisDream
public class ChapterController : Singleton
{
private ChapterData ChapterData => GlobalDataContainer.Instance.GetData();
-
+
///
/// 获取章节列表用于显示
///
@@ -23,8 +23,8 @@ namespace AibisDream
{
cacheChapter = ParseChapterTitle(saveFilePath);
}
-
-
+
+
// 拼接章节列表
var chapterList = ChapterData.chapterList
.Where(item => ChapterData.unlockedChapterList.Contains(item.name))
@@ -38,7 +38,7 @@ namespace AibisDream
hasSaveFile = cacheChapter == chapterSo.name
})
.ToList();
-
+
return chapterList;
}
@@ -47,12 +47,12 @@ namespace AibisDream
var fileInfo = Path.GetFileName(filePath).Split("_");
return fileInfo.Length >= 2 ? fileInfo[1] : string.Empty;
}
-
+
public void StartWithChapter(ChapterVo chapterVo)
{
GameManager.Instance.StartWithLevel(chapterVo.chapterSo);
}
-
+
public void StartWithSaveFile()
{
// 获取当前存档
@@ -90,12 +90,12 @@ namespace AibisDream
LoadChapterList();
LoadUnlockChapters();
}
-
+
private void LoadChapterList()
{
chapterList = new List();
var curChapter = firstChapter;
-
+
do
{
chapterList.Add(curChapter);
@@ -105,26 +105,28 @@ namespace AibisDream
private void LoadUnlockChapters()
{
- unlockedChapterList = JsonUtil.ReadBeanArray(ConstRef.ChapterProgressPath).ToList();
+ unlockedChapterList = File.Exists(ConstRef.ChapterProgressPath)
+ ? JsonUtil.ReadBeanArray(ConstRef.ChapterProgressPath).ToList()
+ : new List { firstChapter.name };
}
public void SaveUnloadChapters()
{
JsonUtil.SaveArray(unlockedChapterList.ToArray(), ConstRef.ChapterProgressPath);
}
-
+
public bool TryGetSaveFilePath(out string saveFilePath)
{
var files = Directory.GetFiles(ConstRef.SaveFilePath, "*.json")
.OrderByDescending(fileName => fileName)
.ToArray();
-
+
if (files.Length <= 0)
{
saveFilePath = string.Empty;
return false;
}
-
+
saveFilePath = files[0];
return true;
}
diff --git a/Assets/Scripts/Game Loop/StorageSystem.cs b/Assets/Scripts/Game Loop/StorageSystem.cs
index 6625eb1c7..ada537861 100644
--- a/Assets/Scripts/Game Loop/StorageSystem.cs
+++ b/Assets/Scripts/Game Loop/StorageSystem.cs
@@ -244,15 +244,22 @@ namespace AibisDream
private void DeleteOldSave()
{
- var fileList = Directory.GetFiles(ConstRef.SaveFilePath);
- if (fileList.Length > MaxSaveNum)
+ if (Directory.Exists(ConstRef.SaveFilePath))
{
- var sorted = fileList.OrderByDescending(f => f).ToArray();
- for (var i = MaxSaveNum; i < fileList.Length; i++)
+ var fileList = Directory.GetFiles(ConstRef.SaveFilePath);
+ if (fileList.Length > MaxSaveNum)
{
- File.Delete(sorted[i]);
+ var sorted = fileList.OrderByDescending(f => f).ToArray();
+ for (var i = MaxSaveNum; i < fileList.Length; i++)
+ {
+ File.Delete(sorted[i]);
+ }
}
}
+ else
+ {
+ Directory.CreateDirectory(ConstRef.SaveFilePath);
+ }
}
public void Load(string savePath)
@@ -277,6 +284,8 @@ namespace AibisDream
private string GetSavePath()
{
+ Directory.CreateDirectory(ConstRef.SaveFilePath);
+
string gameStage;
if (TryGetValue("$gameStage", out float gameStageFloat))
{
diff --git a/Assets/Scripts/Utility/ConstRef.cs b/Assets/Scripts/Utility/ConstRef.cs
index a6573b29b..39c39e3f3 100644
--- a/Assets/Scripts/Utility/ConstRef.cs
+++ b/Assets/Scripts/Utility/ConstRef.cs
@@ -19,8 +19,12 @@ namespace AibisDream.Utility
public static readonly string TestSaveFilePath = Application.streamingAssetsPath + "/TestSaveFiles";
- public static readonly string SaveFilePath = Application.streamingAssetsPath + "/SaveFiles/";
-
+#if UnityEditor
+ public static readonly string SaveFilePath = Application.persistentDataPath + "/SaveFiles/";
+#else
+ public static readonly string SaveFilePath = Application.persistentDataPath + "/AllOurBrokenParts/saves/";
+#endif
+
public static readonly string ChapterProgressPath = $"{Application.streamingAssetsPath}/Config/chapter.json";
#region 本地化索引
diff --git a/Assets/StreamingAssets/Config/chapter.json b/Assets/StreamingAssets/Config/chapter.json
index 0637a088a..bb40fc17e 100644
--- a/Assets/StreamingAssets/Config/chapter.json
+++ b/Assets/StreamingAssets/Config/chapter.json
@@ -1 +1 @@
-[]
\ No newline at end of file
+["Prologue", "Day1_begin", "PeipeiDay1", "Day1_mid"]
\ No newline at end of file
diff --git a/Assets/StreamingAssets/Config/chapter.json.meta b/Assets/StreamingAssets/Config/chapter.json.meta
index e45833ae8..57be62966 100644
--- a/Assets/StreamingAssets/Config/chapter.json.meta
+++ b/Assets/StreamingAssets/Config/chapter.json.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 87ded39c8d4a91647b3a65d4f2b9aa82
+guid: 6d2aeaa00c7b95249bbb41724f17e00c
DefaultImporter:
externalObjects: {}
userData:
diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset
index 027debaf5..8b5625198 100644
--- a/ProjectSettings/ProjectSettings.asset
+++ b/ProjectSettings/ProjectSettings.asset
@@ -133,7 +133,7 @@ PlayerSettings:
vulkanEnableLateAcquireNextImage: 0
vulkanEnableCommandBufferRecycling: 1
loadStoreDebugModeEnabled: 0
- bundleVersion: 0.3.2.12-20250902-181152
+ bundleVersion: 0.3.2.17-20250904-152447
preloadedAssets:
- {fileID: 11400000, guid: 0fb2bc2476953fc43a74f0ab8879077c, type: 2}
metroInputSource: 0