Audio replacements
Replace any AudioClip in the game by name. When the game plays a clip whose name matches your replacement, Jiangyu substitutes your audio at playback time. Every gameplay path that triggers the clip (UI, voice lines, weapon SFX, ambient) picks up the substitution.
Studio workflow
Open the Asset Browser pane.
Type the asset name in the search box. Filter the type to Audio if you want only audio.
Select the asset. The detail panel shows:
A
Replacerow with the path underassets/replacements/to save your replacement at, for example:textaudio/mortar_incoming_whistle_04.wavA
Frequencyrow with the clip's sample rate, for example44100 Hz.A
Channelsrow with the channel count, for example1.An inline player to audition the vanilla clip.
Author your replacement at the same frequency and channel count. Mismatches are resampled by Unity at runtime, which pitch-shifts the result. See Frequency and channels below.
Click Export to pull the vanilla clip out as a starting point. Audio is exported in whatever format Unity embedded (typically
.ogg, although module formats like.it,.xm,.modpass through unchanged).Open the exported file in your audio editor, make your changes, save it under your project's
assets/replacements/directory at the path Studio showed. For the example above, that'sassets/replacements/audio/mortar_incoming_whistle_04.wav.
File layout
assets/replacements/audio/<target-name>.<ext><ext> is .wav, .ogg, or .mp3. Other extensions are ignored.
The basename (without extension) is the target name and must match the AudioClip's name in the asset index.
Frequency and channels
Unity resamples mismatched audio at runtime, which pitch-shifts the sound. Match the vanilla clip's frequency and channel count when you save your replacement. Studio's detail panel shows both values, and on the CLI, assets search <name> --type AudioClip includes them in the output.
If you author a replacement at 48 kHz stereo for a target that ships as 44.1 kHz mono, the sound will play back too fast and high. Mono targets need mono replacements. Stereo targets need stereo replacements.
Shared names
When the same name covers multiple AudioClip assets in the game, all of them are substituted with your replacement. The runtime matches by clip name, so targeting a single instance isn't possible.
Compile logs a warning enumerating every affected clip:
warning: replacement 'taking_fire_10' will substitute 2 AudioClip instances:
sharedassets0.assets/AudioClip/taking_fire_10--317
sharedassets0.assets/AudioClip/taking_fire_10--9518Treat the warning as a checklist. If any of the listed clips shouldn't change, your name is too ambiguous to replace safely.
Compile-time errors
Compile refuses the build, with a clear message, when:
- The asset index isn't built or is unreadable. Build it from Studio's index status indicator, or run
jiangyu assets index. - The target name doesn't resolve to any
AudioClipin the index. - Two replacement files in the project resolve to the same target (for example, both
foo.wavandfoo.ogg).