我想要的效果:点击“彩蛋”按钮打开愤怒的小鸟.exe,但是运行后点击不知道为啥不可以
Button
Button的代码
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ButtonEvent : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
void OnClick()
{
string url = Application.dataPath + "/愤怒的小鸟.exe";
Application.OpenURL(url); //打开
}
}