May I run python script in Fmod studio?

Hi,

I was able to run a simple python script via a .bat file I started in Studio without any issue. It is however worth noting that FMOD Studio will not open a command prompt window when you start a process - if you want to see the output, you can do the following for studio.system.start():

var process = studio.system.start(projectPath + "execute_python.bat", {timeout: 20000});
console.log(process.standardOutput);

Alternatively, if you’re using studio.system.startAsync() you can do this instead:

var process = studio.system.startAsync(projectPath + "execute_python.bat", {});
console.log(process.readAllStandardOutput());

If this doesn’t solve your problem, what version of FMOD Studio are you using?

1 Like