Is there any sample code that I can try to save the output of the master channel to a stereo audio file including everything in the mix (volumes, pan, sends)?
I want to create a button on the UI that will record the mixed event to an audio file.
You can look into the record.cpp example that is included with the FMOD Studio API installation. This should give you some ideas on how the recording aspect of FMOD Studio works.
In your FMOD account, download the appropriate version of FMOD Engine. After installing there should be a api\core\examples folder in the FMOD API directory. In here you will see record.cpp and an Xcode project you can open if you want.
That is correct, the examples provided with the API installation are just C++. The principles are the same but you will need to find a way to do that in Unity C#. You would likely need to ask in the Unity forums as this is more programming related.