统一入口管理PersistentDataPath目录

This commit is contained in:
ALIENJACK\alien 2024-08-16 10:36:00 +08:00
parent 72a1b76ba0
commit bb9ddfb22c
3 changed files with 24 additions and 1 deletions

View File

@ -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

View File

@ -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; }

View File

@ -8,6 +8,13 @@ namespace AxibugEmuOnline.Client
{
public class CoreSupporter : ISupporterImpl
{
public static string PersistentDataPath
{
get
{
return Application.persistentDataPath;
}
}
public Stream OpenRom(string fname)
{