public class OpenFileController : MonoBehaviour {
string path;
//path可以不写路径,需要把被打开的文件放入到Resources文件夹中
private void Update()
{
if (Input.GetKeyDown(KeyCode.A))
{
path = Application.dataPath;
Application.OpenURL("file:///" + path + "/Resources/" + "a.mp4");
}
if (Input.GetKeyDown(KeyCode.B))
{
path = Application.dataPath;
Application.OpenURL("file:///" + path + "/Resources/" + "b.pdf");
}
if (Input.GetKeyDown(KeyCode.C))
{
path = Application.dataPath;
Application.OpenURL("file:///" + path + "/Resources/" + "c.png");
}
if (Input.GetKeyDown(KeyCode.