hi. im trying to make a launcher for all of my games because i have alot of them. i have tried to use this code:
#pragma strict
function OnMouseDown ()
{
System.Diagnostics.Process.Start(Application.dataPath + "Desktop");
//or directly to open external programs:
System.Diagnostics.Process.Start("RacingPlanet2Launch.exe");
}
but it doesnt work. please could somebody help me fix it? the error i get with it is:
Win32Exception: The system cannot find the file specified.
System.Diagnostics.Process.Start_shell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process)
System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process)
System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo)
System.Diagnostics.Process.Start (System.String fileName)
Open Racing Planet 2.OnMouseDown () (at Assets/Open Racing Planet 2.js:5)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)