- Home /
How do I relaunch my game?
Is there a way to get the EXE of my game and execute it again with some launch parameters?
Hi,
Do you want to launch from your game ? Or from your computer ? Do you want to launch the game on exiting an other one ? Or run two instances of the same game ?
Use a cmd file to run the file with launch paramaters?
I want to run two instances from the game at the same time on the computer (Dedicated server and client). Yes, I can use a batch file, and I already do, but I want to replace it with an in game button.
Answer by KdRWaylander · Jun 18, 2015 at 01:15 PM
Hi,
To launch an exe from a script you need to use:
using System.Diagnostics
and then:
Process.Start();
Read this for more information: http://stackoverflow.com/questions/240171/launching-a-application-exe-from-c
Sorry, but this doesn't help at all - running an executable wasn't the issue, finding the game's executable is.
Well, when you build your game you get an .exe and a Data folder, so you know where the exe is, don't you ? Or i misunderstood your problem ?
Your answer
Follow this Question
Related Questions
Only .exe/no data folder game? 0 Answers
Unity Build EXE Stuck 0 Answers
Creating an .EXE problem. 2 Answers
Message Boxes and running .exe files 3 Answers
(Programming languages) Can Javascript/Unityscript be executed as standalone ? 1 Answer