diff --git a/Assets/StartServer.cs b/Assets/StartServer.cs index bbdda28e5a94b439f5d107e28cc8af79e7b781da..bd470d48cc5f55803eaab1e37ab404069ec1417a 100644 --- a/Assets/StartServer.cs +++ b/Assets/StartServer.cs @@ -25,18 +25,68 @@ void PrepareGame() } - IEnumerator ServerRoutine() + IEnumerator ServerRoutine1() { + string command = "\"" + Application.streamingAssetsPath + "\"/start.BAT "+ "\"" + Application.streamingAssetsPath + "\"" ; + command = command.Replace("/", @"\"); + command = "\"" + command + "\""; + UnityEngine.Debug.Log(command); + ProcessStartInfo processInfo; + Process process; + + //processInfo = new ProcessStartInfo("cmd.exe", "/C " + command); + bool cmd = true; + if (cmd) + { + processInfo = new ProcessStartInfo("cmd.exe", "/C " + command); + // processInfo.CreateNoWindow = false; + // processInfo.UseShellExecute = true; + + process = Process.Start(processInfo); + }else + /* + */ + Process.Start("powershell.exe", command); + + + + + // *** Read the streams *** + // Warning: This approach can lead to deadlocks, see Edit #2 + //string output = process.StandardOutput.ReadToEnd(); + //string error = process.StandardError.ReadToEnd(); + + // exitCode = process.ExitCode; + // UnityEngine.Debug.Log(output); + // UnityEngine.Debug.Log(error); + // Console.WriteLine("output>>" + (String.IsNullOrEmpty(output) ? "(none)" : output)); + // Console.WriteLine("error>>" + (String.IsNullOrEmpty(error) ? "(none)" : error)); + // Console.WriteLine("ExitCode: " + exitCode.ToString(), "ExecuteCommand"); + // process.Close(); + + + + + + + yield return null; + } + + + IEnumerator ServerRoutine() + { UnityWebRequest request = UnityWebRequest.Get("localhost:8081/scroll/list"); - yield return request.Send(); + yield return request.SendWebRequest(); if (request.isNetworkError || request.isHttpError) { UnityEngine.Debug.Log("no running server"); - string command = Application.streamingAssetsPath + "/start.BAT " + Application.streamingAssetsPath; + string command = "\"" + Application.streamingAssetsPath + "\"/start.BAT " + "\"" + Application.streamingAssetsPath + "\""; + command = command.Replace("/", @"\"); + command = "\"" + command + "\""; UnityEngine.Debug.Log(command); - int exitCode; + // int exitCode; ProcessStartInfo processInfo; Process process; @@ -53,10 +103,10 @@ IEnumerator ServerRoutine() while (true) { request = UnityWebRequest.Get("localhost:8081/scroll/list"); - yield return request.Send(); + yield return request.SendWebRequest(); if (request.isNetworkError || request.isHttpError) { - UnityEngine.Debug.Log("no running server"); + // UnityEngine.Debug.Log("no running server"); } else { diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 0147887ef4b113c3a3b8da44ef30e3208f1e9120..b2d048143d6c8578929fa16b2430f275f9f9f2bd 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -4,5 +4,11 @@ EditorBuildSettings: m_ObjectHideFlags: 0 serializedVersion: 2 - m_Scenes: [] + m_Scenes: + - enabled: 1 + path: Assets/StartScreen.unity + guid: 80736d45fa76e1b488eab0eb8650ff3d + - enabled: 1 + path: Assets/TreeWorld_02.unity + guid: 9b8063e1ae3c04045b13e20d1ccc73d0 m_configObjects: {} diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset index cd1c3d65a9b9a0d6b214fcf8369b770726e87470..7997460621f1ccd494847a5151dc28695941eada 100644 --- a/ProjectSettings/GraphicsSettings.asset +++ b/ProjectSettings/GraphicsSettings.asset @@ -36,6 +36,8 @@ GraphicsSettings: - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} m_PreloadedShaders: [] m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} @@ -60,3 +62,4 @@ GraphicsSettings: m_AlbedoSwatchInfos: [] m_LightsUseLinearIntensity: 0 m_LightsUseColorTemperature: 0 + m_LogWhenShaderIsCompiled: 0 diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 3e003425d2febdd64087ce288adaa6e58552e7f0..16a58a1cc0d7f1e3f4d6334f8b294553d18ea353 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -12,8 +12,8 @@ PlayerSettings: targetDevice: 2 useOnDemandResources: 0 accelerometerFrequency: 60 - companyName: DefaultCompany - productName: New Unity Project + companyName: KWARC + productName: FrameWorld1 defaultCursor: {fileID: 0} cursorHotspot: {x: 0, y: 0} m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} @@ -155,7 +155,8 @@ PlayerSettings: resolutionScalingMode: 0 androidSupportedAspectRatio: 1 androidMaxAspectRatio: 2.1 - applicationIdentifier: {} + applicationIdentifier: + Standalone: com.KWARC.FrameIT buildNumber: {} AndroidBundleVersionCode: 1 AndroidMinSdkVersion: 16