Skip to content

Commit

Permalink
fix persistent data path on editor(android)
Browse files Browse the repository at this point in the history
  • Loading branch information
boscohyun committed Oct 24, 2023
1 parent e412b22 commit a92670a
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions nekoyume/Assets/_Scripts/PlatformUtility/Platform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public static string PersistentDataPath
{
get
{
#if UNITY_ANDROID
#if !UNITY_EDITOR && UNITY_ANDROID
return "storage/emulated/0/Documents/NineChronicles";
#else
return Application.persistentDataPath;
Expand All @@ -19,33 +19,24 @@ public static string PersistentDataPath

public static string GetPersistentDataPath(string fileName)
{
return Path.Combine(Platform.PersistentDataPath, fileName);
return Path.Combine(PersistentDataPath, fileName);
}

public static string StreamingAssetsPath
{
get { return Application.streamingAssetsPath; }
}
public static string StreamingAssetsPath => Application.streamingAssetsPath;

public static string GetStreamingAssetsPath(string fileName)
{
return Path.Combine(Platform.StreamingAssetsPath, fileName);
return Path.Combine(StreamingAssetsPath, fileName);
}

public static string DataPath
{
get { return Application.dataPath; }
}
public static string DataPath => Application.dataPath;

public static string GetDataPath(string fileName)
{
return Path.Combine(Platform.DataPath, fileName);
return Path.Combine(DataPath, fileName);
}

public static RuntimePlatform CurrentPlatform
{
get { return Application.platform; }
}
public static RuntimePlatform CurrentPlatform => Application.platform;

public static bool IsTargetPlatform(RuntimePlatform platform)
{
Expand All @@ -54,8 +45,8 @@ public static bool IsTargetPlatform(RuntimePlatform platform)

public static bool IsMobilePlatform()
{
return Platform.IsTargetPlatform(RuntimePlatform.Android) ||
Platform.IsTargetPlatform(RuntimePlatform.IPhonePlayer);
return IsTargetPlatform(RuntimePlatform.Android) ||
IsTargetPlatform(RuntimePlatform.IPhonePlayer);
}
}
}

0 comments on commit a92670a

Please sign in to comment.