You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
885 B
34 lines
885 B
3 years ago
|
using UnityEngine;
|
||
|
using System.Collections;
|
||
|
using UnityEngine.UI;
|
||
|
using System.Diagnostics;
|
||
|
using System.IO;
|
||
|
using AX.MessageSystem;
|
||
|
public class Retrievals : MonoBehaviour {
|
||
|
|
||
|
/// <summary>
|
||
|
/// 外部调预案
|
||
|
/// </summary>
|
||
|
|
||
|
private Button RetrievalButton;
|
||
|
void Start ()
|
||
|
{
|
||
|
RetrievalButton = GetComponent<Button>();
|
||
|
RetrievalButton.onClick.AddListener(RetrievalBtn);
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
public void RetrievalBtn()
|
||
|
{
|
||
|
|
||
|
string Paths = Application.dataPath + @"/Three-dimensionalPlan/" + MySceneManager.GetActiveScene().name + "/" + MySceneManager.GetActiveScene().name+".exe";//判断文件需要添加后缀名
|
||
|
if (!File.Exists(Paths))
|
||
|
{
|
||
|
MessageDispatcher.SendMessage("Operatinghints", (object)"当前场景没有预案");
|
||
|
return;
|
||
|
}
|
||
|
Process.Start(Paths);
|
||
|
}
|
||
|
}
|