Skip to content
Snippets Groups Projects
Commit 36988c81 authored by John Schihada's avatar John Schihada
Browse files

Working Release for Windows: Restart-Button working

parent 7fc2199d
No related branches found
No related tags found
No related merge requests found
......@@ -22,9 +22,6 @@
# ProBuilder/ProGrid files
[Aa]ssets/ProCore/
#StreamingAssetsFolder
[Aa]ssets/StreamingAssets
# Autogenerated Jetbrains Rider plugin
[Aa]ssets/Plugins/Editor/JetBrains*
......
......@@ -44133,7 +44133,7 @@ PrefabInstance:
- target: {fileID: 798194300310305303, guid: b996060e27da25c498842defc1996d84,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: -0.00024414062
objectReference: {fileID: 0}
- target: {fileID: 798194301124356650, guid: b996060e27da25c498842defc1996d84,
type: 3}
......@@ -64,7 +64,7 @@ IEnumerator getScrollsfromServer() {
if (request.isNetworkError || request.isHttpError)
{
Debug.LogWarning(request.error);
string jsonString = File.ReadAllText(Application.dataPath + "/scrolls.json");
string jsonString = File.ReadAllText(Application.streamingAssetsPath + "/scrolls.json");
Debug.Log(jsonString);
BuildScrolls(jsonString);
}
......@@ -72,7 +72,10 @@ IEnumerator getScrollsfromServer() {
{
CommunicationEvents.ServerRunning = true;
string jsonString = request.downloadHandler.text;
Debug.Log(jsonString);
Debug.Log("JsonString from Server: \n" + jsonString);
if(jsonString.Equals("[]"))
jsonString = File.ReadAllText(Application.streamingAssetsPath + "/scrolls.json");
Debug.Log("Used JsonString: \n" + jsonString);
//scroll display not yet implemented;
//buildScrollSelection(jsonString);
BuildScrolls(jsonString);
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine;
using static StartServer;
public class Restart : MonoBehaviour
{
public void LoadStartScreen()
{
process.Kill();
Level.solved = false;
CommunicationEvents.Facts.Clear();
UnityEngine.SceneManagement.SceneManager.LoadScene(0);
}
public void OnApplicationQuit()
{
process.Kill();
}
}
......@@ -11,6 +11,9 @@ public class StartServer : MonoBehaviour
[SerializeField]
TMPro.TextMeshProUGUI WaitingText;
public static Process process;
public static ProcessStartInfo processInfo;
// Start is called before the first frame update
void Start()
......@@ -85,9 +88,6 @@ IEnumerator ServerRoutine()
#if!UNITY_WEBGL
// int exitCode;
ProcessStartInfo processInfo;
Process process;
#if UNITY_STANDALONE_LINUX
......@@ -121,20 +121,12 @@ IEnumerator ServerRoutine()
process = Process.Start(proc);
#else
string command = "";
command = "\"" + Application.streamingAssetsPath + "\"/start.BAT " + "\"" + Application.streamingAssetsPath + "\"";
command = command.Replace("/", @"\");
command = "\"" + command + "\"";
processInfo = new ProcessStartInfo("cmd.exe", "/c " + command);
processInfo.CreateNoWindow = false;
processInfo.UseShellExecute = true;
// *** Redirect the output ***
// processInfo.RedirectStandardError = true;
//processInfo.RedirectStandardOutput = true;
processInfo = new ProcessStartInfo();
processInfo.FileName = "java";
processInfo.Arguments = @"-jar " + Application.streamingAssetsPath + "/frameit.jar" + " -bind :8085 -archive-root " + Application.streamingAssetsPath + "/archives";
//set "UseShellExecute = true" AND "CreateNoWindow = false" to see the mmt-server output
processInfo.UseShellExecute = false;
processInfo.CreateNoWindow = true;
process = Process.Start(processInfo);
#endif
......@@ -169,10 +161,6 @@ IEnumerator ServerRoutine()
// Console.WriteLine("output>>" + (String.IsNullOrEmpty(output) ? "(none)" : output));
// Console.WriteLine("error>>" + (String.IsNullOrEmpty(error) ? "(none)" : error));
// Console.WriteLine("ExitCode: " + exitCode.ToString(), "ExecuteCommand");
#if !UNITY_WEBGL
process.Close();
#endif
}
PrepareGame();
......
fileFormatVersion: 2
guid: b50933d8f78b79044977f61539ac1b40
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 4069fe7e4a7672e47834935275b3aa8c
TextScriptImporter:
guid: 610110843770eb7468fad8b79ec7fdfa
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
......
[
{
"problemTheory": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem",
"solutionTheory": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Solution",
"label": "OppositeLen",
"description": "Given a triangle $0$1$2 right angled at $2, the distance $0$1 can be computed from the angle at $1 and the distance $1$2",
"requiredFacts": [
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pA",
"label": "a",
"tp": {
"original": {
"uri": "http://mathhub.info/MitM/core/geometry?3DGeometry?point",
"kind": "OMS"
},
"simplified": {
"uri": "http://mathhub.info/MitM/core/geometry?3DGeometry?point",
"kind": "OMS"
}
},
"df": null
},
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pB",
"label": "b",
"tp": {
"original": {
"uri": "http://mathhub.info/MitM/core/geometry?3DGeometry?point",
"kind": "OMS"
},
"simplified": {
"uri": "http://mathhub.info/MitM/core/geometry?3DGeometry?point",
"kind": "OMS"
}
},
"df": null
},
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pC",
"label": "c",
"tp": {
"original": {
"uri": "http://mathhub.info/MitM/core/geometry?3DGeometry?point",
"kind": "OMS"
},
"simplified": {
"uri": "http://mathhub.info/MitM/core/geometry?3DGeometry?point",
"kind": "OMS"
}
},
"df": null
},
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pdistBC_v",
"label": "pdist$1$2_v",
"tp": {
"original": {
"uri": "http://mathhub.info/MitM/Foundation?RealLiterals?real_lit",
"kind": "OMS"
},
"simplified": {
"uri": "http://mathhub.info/MitM/Foundation?RealLiterals?real_lit",
"kind": "OMS"
}
},
"df": null
},
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pdistBC",
"label": "pdistt$1$2",
"tp": {
"original": {
"applicant": {
"uri": "http://mathhub.info/FrameIT/frameworld?DistanceFact?distanceFact",
"kind": "OMS"
},
"arguments": [
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pB",
"kind": "OMS"
},
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pC",
"kind": "OMS"
},
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pdistBC_v",
"kind": "OMS"
}
],
"kind": "OMA"
},
"simplified": {
"applicant": {
"uri": "http://mathhub.info/FrameIT/frameworld?DistanceFact?distanceFact",
"kind": "OMS"
},
"arguments": [
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pB",
"kind": "OMS"
},
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pC",
"kind": "OMS"
},
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pdistBC_v",
"kind": "OMS"
}
],
"kind": "OMA"
}
},
"df": null
},
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pangleABC_v",
"label": "pangleAt$0$1$2_v",
"tp": {
"original": {
"uri": "http://mathhub.info/MitM/Foundation?RealLiterals?real_lit",
"kind": "OMS"
},
"simplified": {
"uri": "http://mathhub.info/MitM/Foundation?RealLiterals?real_lit",
"kind": "OMS"
}
},
"df": null
},
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pangleABC",
"label": "pangle$0$1$2",
"tp": {
"original": {
"applicant": {
"uri": "http://mathhub.info/FrameIT/frameworld?AngleFact?angleFact",
"kind": "OMS"
},
"arguments": [
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pA",
"kind": "OMS"
},
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pB",
"kind": "OMS"
},
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pC",
"kind": "OMS"
},
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pangleABC_v",
"kind": "OMS"
}
],
"kind": "OMA"
},
"simplified": {
"applicant": {
"uri": "http://mathhub.info/FrameIT/frameworld?AngleFact?angleFact",
"kind": "OMS"
},
"arguments": [
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pA",
"kind": "OMS"
},
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pB",
"kind": "OMS"
},
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pC",
"kind": "OMS"
},
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pangleABC_v",
"kind": "OMS"
}
],
"kind": "OMA"
}
},
"df": null
},
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pangleBCA",
"label": "pangle$1$2$0",
"tp": {
"original": {
"applicant": {
"uri": "http://mathhub.info/FrameIT/frameworld?AngleFact?angleFact",
"kind": "OMS"
},
"arguments": [
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pB",
"kind": "OMS"
},
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pC",
"kind": "OMS"
},
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pA",
"kind": "OMS"
},
{
"float": 90.0,
"kind": "OMF"
}
],
"kind": "OMA"
},
"simplified": {
"applicant": {
"uri": "http://mathhub.info/FrameIT/frameworld?AngleFact?angleFact",
"kind": "OMS"
},
"arguments": [
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pB",
"kind": "OMS"
},
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pC",
"kind": "OMS"
},
{
"uri": "http://mathhub.info/FrameIT/frameworld?OppositeLen_Problem?pA",
"kind": "OMS"
},
{
"float": 90.0,
"kind": "OMF"
}
],
"kind": "OMA"
}
},
"df": null
}
]
}
]
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment