zoukankan      html  css  js  c++  java
  • unity 控制端调虚拟端

      using UnityEngine;
      using System.Collections;
      using UnityEngine.UI;
      using UnityEngine.SceneManagement;
      using System.Diagnostics;
      /// <summary>
      /// 脚本挂载在button上
    /// 跨场景,单击按钮跳转主场景,此时控制端调用虚拟端。 /// </summary> public class EnterScene : MonoBehaviour { string FileName = ""; /// <summary> /// 目标场景名称 /// </summary> public string SceneName; void Start() { FileName = Application.dataPath + "/" + "GJZY Virtual/" + "GJZY Virtual" + ".exe"; //第一个"GJZY Virtual" 为虚拟文件夹,第二个GJZY Virtual 为虚拟的exe GetComponent<Button>().onClick.AddListener(delegate() { OnButtonClick(); }); EventTriggerListener.Get(CloseBtn.gameObject).onClick = BtnClick; } /// <summary> /// 跳转至目标场景 /// </summary> void OnButtonClick() { Process.Start(FileName); SceneManager.LoadScene("ArchotectureBoilling");//跳转控制的主场景,ArchotectureBoilling为主场景名字 } }
  • 相关阅读:
    Linux进程间通信(IPC)
    mq_setattr
    mq_getattr
    mq_unlink
    mq_receive
    mq_send
    mq_close
    POSIX消息队列
    mq_open
    C语言关键字
  • 原文地址:https://www.cnblogs.com/Cocomo/p/6868344.html
Copyright © 2011-2022 走看看