Compare firing audio at different distances
中文 | English
Run this command at the repository root to replay the examples through the local Unity MCP.
python Docs/Manual/manual/tools/tutorials.py run fmod-sound-debugging
Click to expand MCP actionsClick to collapse MCP actions
Prepare the teaching sample. The recipe provides ${variables}.
{
"variables": {
"scene": "../../../Panzer-War-Mod-SDK/Packages/Sdk/com.shanghaiwindy.middlelayer/Tools/RuntimeDebugger/FmodPlayground.unity"
},
"calls": []
}
- In the SDK, open
Packages/com.shanghaiwindy.middlelayer/Tools/RuntimeDebugger/FmodPlayground.unity. - Select FmodSoundDebugger and assign the sound asset in Bullet Sound. Set Fire Interval if you need a different repeat interval.
- Enter Play Mode. Move the sound source in the Scene view and compare the sound at different distances from the listener.
Click to expand MCP actionsClick to collapse MCP actions
Read the source object and sound reference from the SDK scene. Audition and compare distances in the SDK project.
[
{
"tool": "invoke",
"arguments": {
"path": "static:System.IO.File/ReadAllText",
"args": [
"${scene}"
]
},
"expect": {
"regex": "(?s)m_Name: FmodSoundDebugger.*?bulletSound: \\{fileID: 11400000, guid: [a-f0-9]{32}.*?fireInterval: 5"
}
}
]