I have a question, I made a Game Launcher for my Unity game with ReactJS, is it possible to run the game ( an exe file) when you click on play?
I'd suggest you should do it with NodeJS, as it will give you much more control. Invoke an API Call to your local NodeJS script
ReactJS
useEffect(() => {
fetch(NODE_URL + "/execute-binary")
.then(response => response.json())
.then(data => console.log(data));
}, []);
Node Script:
var exec = require('child_process').execFile;
var funToExecuteBinary = function(){
exec('gamelauncher.exe', function(err, data) {
console.log(err)
console.log(data.toString());
});
}
app.get('/execute-binary', function(req, res) {
funToExecuteBinary();
res.send('Game launcher executed');
})