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

Linux support

parent 9164794f
......@@ -11354,7 +11354,7 @@ Camera:
field of view: 60
orthographic: 1
orthographic size: 5
m_Depth: 1
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 8
......@@ -12485,7 +12485,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
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_Pivot: {x: 1, y: 0.5}
--- !u!114 &1850716665
......@@ -13858,7 +13858,7 @@ Camera:
field of view: 30
orthographic: 0
orthographic size: 5
m_Depth: 0
m_Depth: -2
m_CullingMask:
serializedVersion: 2
m_Bits: 1
......
......@@ -394,6 +394,8 @@ namespace MDPro3
string fullPath;
#if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS)
fullPath = "file://" + Application.persistentDataPath + Program.slash + path;
#elif UNITY_STANDALONE_LINUX || UNITY_STANDALONE_OSX
fullPath = Path.Combine("file://" + Environment.CurrentDirectory, path);
#else
fullPath = Path.Combine(Environment.CurrentDirectory, path);
#endif
......
......@@ -53,7 +53,7 @@ namespace MDPro3
commonShopButtonOverMat = mie.Current;
SetCommonShopButtonMaterial(commonShopButtonOverMat);
#if UNITY_ANDROID
#if UNITY_ANDROID || UNITY_STANDALONE_LINUX
var depens = Directory.GetFiles(Program.root + "CrossDuel/Dependency", "*.bundle");
foreach (var depen in depens)
{
......@@ -81,7 +81,9 @@ namespace MDPro3
return null;
string fullPath;
#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
fullPath = Environment.CurrentDirectory + Program.slash + path;
#endif
......
......@@ -268,6 +268,7 @@ namespace MDPro3
public const string PATH_ROOT_EDITOR = "Platforms/";
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_IOS = "iOS/";
public const string PATH_ROOT_MAC = "StandaloneOSX/";
......@@ -282,6 +283,8 @@ namespace MDPro3
root = PATH_ROOT_IOS;
#elif UNITY_STANDALONE_OSX
root = PATH_ROOT_MAC;
#elif UNITY_STANDALONE_LINUX
root = PATH_ROOT_LINUX;
#endif
#if UNITY_EDITOR
......
......@@ -452,7 +452,7 @@ namespace MDPro3.UI.ServantUI
currentList.Add(item);
}
#if UNITY_ANDROID
#if UNITY_ANDROID || UNITY_STANDALONE_LINUX
if (currentContent == "Mate")
{
var files = new DirectoryInfo(Program.root + "CrossDuel").GetFiles("*.bundle");
......
......@@ -41,7 +41,7 @@ namespace MDPro3.UI.ServantUI
private void Awake()
{
#if UNITY_ANDROID
#if UNITY_ANDROID || UNITY_STANDALONE_LINUX
var files = Directory.GetFiles(Program.root + "CrossDuel", "*.bundle");
foreach (var file in files)
{
......
......@@ -804,7 +804,7 @@ namespace MDPro3.UI.ServantUI
foreach (var resolution in Screen.resolutions)
{
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 width = int.Parse(Regex.Split(selection, " x ")[1]);
if (height > width)
......
......@@ -440,7 +440,7 @@ namespace MDPro3.Utility
{
#if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS)
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);
#else
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