Get the Thunderstore App
Easily install and manage your mods with the Thunderstore App!
Audio loggingUpdated 2 months ago
For what purpose?
If you are making audio mods and want to find out the name of a specific audio clip or maybe where a sound plays from, like what Unity GameObject the audio source is attached to. For all of that, this functionality is what you are after.
How to use?
To use the logging, you simply want to press the "F5" key on your keyboard. It will show you basic information about most sounds that are currently playing, like the name of the GameObject the audio source is attached to and the name of the sound they are playing and if they are playing using PlayOneShot, PlayClipAtPoint or normal Play. If you want to know even more information, like getting the whole hierarchy of the audio source all the way to the root object, you can use the in-depth logging, which can be toggled with "LeftAlt + F5". If you're interested in other types of logs that might help diagnose problems or are after playOnAwake audio sources, you can try the informational logging toggle with "LeftControl + F5". If you are interested in knowing if your sounds are working or you're wondering what sounds you have replaced and with what chances? For this you can use LeftShift + F5, which will print all of the currently replaced sounds into the console.
Where do I see these logs?
The logs show up either in the BepInEx console if you have the correct settings. (Check mod page for the BepInEx.cfg) After toggling any of the logging features on, you should see something along the lines of "Toggling AudioSource debug logs" or "Toggling in-depth debug logs" in the console or the log file, after that logs should get printed to the console and log file.