Newer
Older
John Schihada
committed
using System;
using System.Diagnostics;
using System.ComponentModel;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MMTInterface : MonoBehaviour
{
John Schihada
committed
private Process mmtServerProcess;
private ProcessStartInfo mmtServerProcessInfo;
// Start is called before the first frame update
void Start()
{
John Schihada
committed
//Start the mmt.bat for carrying out http-Requests
//TODO: Putting the absolute path to mmt.bat here should soon be changed
/*mmtServerProcessInfo = new ProcessStartInfo("cmd.exe", "/c " + "C:\\Users\\John\\Downloads\\Program_Downloads\\For_FAU_PROJECT_MA_MMT\\MMT\\deploy\\mmt.bat");
//CreateNoWindow = flase -> For now only for testing purposes
mmtServerProcessInfo.CreateNoWindow = false;
mmtServerProcessInfo.UseShellExecute = false;
mmtServerProcessInfo.RedirectStandardError = true;
mmtServerProcessInfo.RedirectStandardOutput = true;
mmtServerProcess = Process.Start(mmtServerProcessInfo);
*/
CommunicationEvents.AddEvent.AddListener(AddFactToMMT);
John Schihada
committed
CommunicationEvents.RemoveEvent.AddListener(RemoveFactFromMMT);
}
void AddFactToMMT(RaycastHit hit, int id )
{
//send new fact to MMT
John Schihada
committed
UnityEngine.Debug.Log("add fact"+ id);
}
void RemoveFactFromMMT(RaycastHit hit, int id)
{
John Schihada
committed
UnityEngine.Debug.Log("remove fact"+ id);