-
how to start games
ok i have a trouble here, when i try to start a game with
System.Diagnostics.Process.Start(@"path");
the game cant axcess its own files, is says like couldnt find the file ect BUT the files are there
how do i start a game with c# that uses other files??
-
Re: how to start games
Post some code from your game and post the exceptions you get .
-
Re: how to start games
When you make this call
System.Diagnostics.Process.Start(@"path");
what is the current working directory?
-
Re: how to start games
-
Re: how to start games
What I mean is that the process you are starting will use the parent process working directory unless you specifically specify it and if the program starting the process is not in the same directory as the program to be started it will not find any of its files.
You need to use the StartInfo Class to specify a working directory and program
Code:
ProcessStartInfo ProgInfo = new ProcessStartInfo(FilePath);
Prog.WorkingDirectory = WorkingDir;
Process prog = new Process(ProgInfo);
-
Re: how to start games
thanks now it working perfect :)