I have a video game and added to it “ffmpeg” to record the game for a few seconds. I developed the game in the editor mode and it works and records the videos. After that, I built the game and I was able to generate the Unity executable. When I tried to call the executable from a Python script, it started the game but did not do the recording.
However, when I do “build and run” it builds and runs the game successfully and also generates the video. Can anyone give me a hint on what I am doing wrong? Again the script is able to start the game but fails to do the recording.
Below is my Python script:
import subprocess
Unity_exe_path = r"D:\Python_CODE_UNITY\UnityExe\Unity.exe"
Unity_recording_path = r"D:\Python_CODE_UNITY\UnityExe\ Unity_Data\StreamingAssets\FFmpegOut\Windows\ffmpeg.exe"
subprocess.Popen(Unity_exe_path)
subprocess.Popen(Unity_recording_path)