From bb9ddfb22c74fd4c91919da2cb038f39eaf3ee55 Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Fri, 16 Aug 2024 10:36:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E5=85=A5=E5=8F=A3=E7=AE=A1?= =?UTF-8?q?=E7=90=86PersistentDataPath=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Resources/UIPrefabs/MenuItemTemplate.prefab | 16 ++++++++++++++++ .../Assets/Script/Manager/RomLib/RomFile.cs | 2 +- .../Assets/Script/NesEmulator/CoreSupporter.cs | 7 +++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/MenuItemTemplate.prefab b/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/MenuItemTemplate.prefab index 758655c..deabe98 100644 --- a/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/MenuItemTemplate.prefab +++ b/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/MenuItemTemplate.prefab @@ -84,6 +84,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1998281097548910301} + - component: {fileID: 8083619837431842572} - component: {fileID: 2502609279043838113} - component: {fileID: 5700455559359757662} m_Layer: 5 @@ -113,6 +114,21 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 200, y: 203} m_Pivot: {x: 0, y: 0.5} +--- !u!111 &8083619837431842572 +Animation: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3189920797946144379} + m_Enabled: 1 + serializedVersion: 3 + m_Animation: {fileID: 0} + m_Animations: [] + m_WrapMode: 0 + m_PlayAutomatically: 1 + m_AnimatePhysics: 0 + m_CullingType: 0 --- !u!114 &2502609279043838113 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/AxibugEmuOnline.Client/Assets/Script/Manager/RomLib/RomFile.cs b/AxibugEmuOnline.Client/Assets/Script/Manager/RomLib/RomFile.cs index 5c44b9d..84c22cc 100644 --- a/AxibugEmuOnline.Client/Assets/Script/Manager/RomLib/RomFile.cs +++ b/AxibugEmuOnline.Client/Assets/Script/Manager/RomLib/RomFile.cs @@ -15,7 +15,7 @@ namespace AxibugEmuOnline.Client private string fileName; private EnumPlatform platform; - public string LocalFilePath => $"{Application.persistentDataPath}/RemoteRoms/{platform}/{fileName}"; + public string LocalFilePath => $"{CoreSupporter.PersistentDataPath}/RemoteRoms/{platform}/{fileName}"; public bool FileReady => hasLocalFile; public int ID => webData != null ? webData.id : -1; public bool IsDownloading { get; private set; } diff --git a/AxibugEmuOnline.Client/Assets/Script/NesEmulator/CoreSupporter.cs b/AxibugEmuOnline.Client/Assets/Script/NesEmulator/CoreSupporter.cs index f7786e5..46ce0f8 100644 --- a/AxibugEmuOnline.Client/Assets/Script/NesEmulator/CoreSupporter.cs +++ b/AxibugEmuOnline.Client/Assets/Script/NesEmulator/CoreSupporter.cs @@ -8,6 +8,13 @@ namespace AxibugEmuOnline.Client { public class CoreSupporter : ISupporterImpl { + public static string PersistentDataPath + { + get + { + return Application.persistentDataPath; + } + } public Stream OpenRom(string fname) {