May I run python script in Fmod studio?

I am trying to run a python script after building. And i am trying to write a bat file which will execute python script, but it cannot work
code like:

studio.system.start(projectPath + "execute_python.bat", {timeout: 20000})

My python file is aim to copy built files to somewhere else, and make sure some banks will be deleted if it is no longer used.


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});

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

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

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

1 Like