Add Custom Enviroment Option (Need to fix Lighting issue))
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
@@ -7,11 +5,21 @@ using Lavender.Systems;
|
||||
|
||||
public class StartBatchManager : MonoBehaviour
|
||||
{
|
||||
uint pid = 0;
|
||||
private void Start()
|
||||
{
|
||||
ConfigManager.EnsureInitialization();
|
||||
if (ConfigManager.config.batFileLocation != "")
|
||||
StartExternalProcess.Start(ConfigManager.config.batFileLocation);
|
||||
pid = StartExternalProcess.Start(ConfigManager.config.batFileLocation);
|
||||
UnityEngine.Debug.Log("Batch file with PID: " + pid);
|
||||
//Process.Start(Path.GetFullPath(ConfigManager.config.batFileLocation));
|
||||
}
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (pid != 0)
|
||||
{
|
||||
StartExternalProcess.KillProcess(pid);
|
||||
UnityEngine.Debug.Log("Batch file with PID: " + pid + " killed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user