Commit b9118624 authored by 赤子奈落's avatar 赤子奈落

Linux support

parent 9164794f
...@@ -11354,7 +11354,7 @@ Camera: ...@@ -11354,7 +11354,7 @@ Camera:
field of view: 60 field of view: 60
orthographic: 1 orthographic: 1
orthographic size: 5 orthographic size: 5
m_Depth: 1 m_Depth: -1
m_CullingMask: m_CullingMask:
serializedVersion: 2 serializedVersion: 2
m_Bits: 8 m_Bits: 8
...@@ -12485,7 +12485,7 @@ RectTransform: ...@@ -12485,7 +12485,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0} m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 599.9999, y: 0} m_AnchoredPosition: {x: 599.9998, y: 0}
m_SizeDelta: {x: 600, y: 0} m_SizeDelta: {x: 600, y: 0}
m_Pivot: {x: 1, y: 0.5} m_Pivot: {x: 1, y: 0.5}
--- !u!114 &1850716665 --- !u!114 &1850716665
...@@ -13858,7 +13858,7 @@ Camera: ...@@ -13858,7 +13858,7 @@ Camera:
field of view: 30 field of view: 30
orthographic: 0 orthographic: 0
orthographic size: 5 orthographic size: 5
m_Depth: 0 m_Depth: -2
m_CullingMask: m_CullingMask:
serializedVersion: 2 serializedVersion: 2
m_Bits: 1 m_Bits: 1
......
...@@ -394,6 +394,8 @@ namespace MDPro3 ...@@ -394,6 +394,8 @@ namespace MDPro3
string fullPath; string fullPath;
#if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS) #if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS)
fullPath = "file://" + Application.persistentDataPath + Program.slash + path; fullPath = "file://" + Application.persistentDataPath + Program.slash + path;
#elif UNITY_STANDALONE_LINUX || UNITY_STANDALONE_OSX
fullPath = Path.Combine("file://" + Environment.CurrentDirectory, path);
#else #else
fullPath = Path.Combine(Environment.CurrentDirectory, path); fullPath = Path.Combine(Environment.CurrentDirectory, path);
#endif #endif
......
...@@ -53,7 +53,7 @@ namespace MDPro3 ...@@ -53,7 +53,7 @@ namespace MDPro3
commonShopButtonOverMat = mie.Current; commonShopButtonOverMat = mie.Current;
SetCommonShopButtonMaterial(commonShopButtonOverMat); SetCommonShopButtonMaterial(commonShopButtonOverMat);
#if UNITY_ANDROID #if UNITY_ANDROID || UNITY_STANDALONE_LINUX
var depens = Directory.GetFiles(Program.root + "CrossDuel/Dependency", "*.bundle"); var depens = Directory.GetFiles(Program.root + "CrossDuel/Dependency", "*.bundle");
foreach (var depen in depens) foreach (var depen in depens)
{ {
...@@ -81,7 +81,9 @@ namespace MDPro3 ...@@ -81,7 +81,9 @@ namespace MDPro3
return null; return null;
string fullPath; string fullPath;
#if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS) #if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS)
fullPath = "file://" + Application.persistentDataPath + Program.slash + path; fullPath = Path.Combine("file://" + Application.persistentDataPath, path);
#elif UNITY_STANDALONE_LINUX || UNITY_STANDALONE_OSX
fullPath = Path.Combine("file://" + Environment.CurrentDirectory, path);
#else #else
fullPath = Environment.CurrentDirectory + Program.slash + path; fullPath = Environment.CurrentDirectory + Program.slash + path;
#endif #endif
......
...@@ -268,6 +268,7 @@ namespace MDPro3 ...@@ -268,6 +268,7 @@ namespace MDPro3
public const string PATH_ROOT_EDITOR = "Platforms/"; public const string PATH_ROOT_EDITOR = "Platforms/";
public const string PATH_ROOT_WINDOWS64 = "StandaloneWindows64/"; public const string PATH_ROOT_WINDOWS64 = "StandaloneWindows64/";
public const string PATH_ROOT_LINUX = "StandaloneLinux64/";
public const string PATH_ROOT_ANDROID = "Android/"; public const string PATH_ROOT_ANDROID = "Android/";
public const string PATH_ROOT_IOS = "iOS/"; public const string PATH_ROOT_IOS = "iOS/";
public const string PATH_ROOT_MAC = "StandaloneOSX/"; public const string PATH_ROOT_MAC = "StandaloneOSX/";
...@@ -282,6 +283,8 @@ namespace MDPro3 ...@@ -282,6 +283,8 @@ namespace MDPro3
root = PATH_ROOT_IOS; root = PATH_ROOT_IOS;
#elif UNITY_STANDALONE_OSX #elif UNITY_STANDALONE_OSX
root = PATH_ROOT_MAC; root = PATH_ROOT_MAC;
#elif UNITY_STANDALONE_LINUX
root = PATH_ROOT_LINUX;
#endif #endif
#if UNITY_EDITOR #if UNITY_EDITOR
......
...@@ -119,8 +119,8 @@ namespace MDPro3.Servant ...@@ -119,8 +119,8 @@ namespace MDPro3.Servant
var targetFolder2 = Program.root + "MonsterCutin2"; var targetFolder2 = Program.root + "MonsterCutin2";
#if UNITY_STANDALONE_WIN && !UNITY_EDITOR #if UNITY_STANDALONE_WIN && !UNITY_EDITOR
targetFolder = Path.Combine(Application.dataPath, Program.root + "MonsterCutin"); targetFolder = Path.Combine(Application.dataPath, Program.root + "MonsterCutin");
targetFolder2 = Path.Combine(Application.dataPath, Program.root + "MonsterCutin2"); targetFolder2 = Path.Combine(Application.dataPath, Program.root + "MonsterCutin2");
#endif #endif
if (!Directory.Exists(targetFolder)) if (!Directory.Exists(targetFolder))
Directory.CreateDirectory(targetFolder); Directory.CreateDirectory(targetFolder);
......
...@@ -452,7 +452,7 @@ namespace MDPro3.UI.ServantUI ...@@ -452,7 +452,7 @@ namespace MDPro3.UI.ServantUI
currentList.Add(item); currentList.Add(item);
} }
#if UNITY_ANDROID #if UNITY_ANDROID || UNITY_STANDALONE_LINUX
if (currentContent == "Mate") if (currentContent == "Mate")
{ {
var files = new DirectoryInfo(Program.root + "CrossDuel").GetFiles("*.bundle"); var files = new DirectoryInfo(Program.root + "CrossDuel").GetFiles("*.bundle");
......
...@@ -41,7 +41,7 @@ namespace MDPro3.UI.ServantUI ...@@ -41,7 +41,7 @@ namespace MDPro3.UI.ServantUI
private void Awake() private void Awake()
{ {
#if UNITY_ANDROID #if UNITY_ANDROID || UNITY_STANDALONE_LINUX
var files = Directory.GetFiles(Program.root + "CrossDuel", "*.bundle"); var files = Directory.GetFiles(Program.root + "CrossDuel", "*.bundle");
foreach (var file in files) foreach (var file in files)
{ {
......
...@@ -804,7 +804,7 @@ namespace MDPro3.UI.ServantUI ...@@ -804,7 +804,7 @@ namespace MDPro3.UI.ServantUI
foreach (var resolution in Screen.resolutions) foreach (var resolution in Screen.resolutions)
{ {
string selection = Regex.Split(resolution.ToString(), " @ ")[0]; string selection = Regex.Split(resolution.ToString(), " @ ")[0];
#if !UNITY_EDITOR && UNITY_ANDROID #if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS)
int height = int.Parse(Regex.Split(selection, " x ")[0]); int height = int.Parse(Regex.Split(selection, " x ")[0]);
int width = int.Parse(Regex.Split(selection, " x ")[1]); int width = int.Parse(Regex.Split(selection, " x ")[1]);
if (height > width) if (height > width)
......
...@@ -440,7 +440,7 @@ namespace MDPro3.Utility ...@@ -440,7 +440,7 @@ namespace MDPro3.Utility
{ {
#if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS) #if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS)
path = Path.Combine("file://" + Application.persistentDataPath, path); path = Path.Combine("file://" + Application.persistentDataPath, path);
#elif UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX #elif UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX || UNITY_STANDALONE_LINUX
path = Path.Combine("file://" + Environment.CurrentDirectory, path); path = Path.Combine("file://" + Environment.CurrentDirectory, path);
#else #else
path = Path.Combine(Environment.CurrentDirectory, path); path = Path.Combine(Environment.CurrentDirectory, path);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment