FMOD Integration
ConvoCore can drive voice dialogue through FMOD Studio by mapping each dialogue line to an FMOD event path. ConvoCore passes the event path to a provider component; the provider calls the FMOD API. This keeps the ConvoCore core assembly free of FMOD compile dependencies.
Prerequisites
- FMOD Studio Unity Integration package installed in your project. Minimum recommended version: FMOD 2.01+. Download from fmod.com/download.
- Your dialogue audio exported from FMOD Studio as events with paths such as
event:/VO/CharacterA/Line001. - The ConvoCoreAudioProviderFMOD sample script imported from the ConvoCore samples folder (see step 1 below).
Step-by-Step Setup
1. Import the FMOD Sample Provider
ConvoCore ships a ready-made FMOD provider in the package samples. Import it into your project:
- In Unity open Window → Package Manager.
- Find ConvoCore in the list.
- Under Samples, import Audio / FMOD Integration.
This adds ConvoCoreAudioProviderFMOD.cs to your project. The file will not compile unless the FMOD Unity Integration is also installed.
2. Add the Provider to Your Runner
Select the GameObject that has your ConvoCore runner component:
- Click Add Component.
- Search for and add ConvoCoreAudioProviderFMOD.
- In the ConvoCore inspector, drag the
ConvoCoreAudioProviderFMODcomponent into the Audio Provider Object field.
3. Create and Configure the Audio Manifest
Right-click in the Project panel:
Create → ConvoCore → Audio Manifest
In the manifest inspector:
- Set Audio Backend to
FMOD. - Set Mode to
Conversation Driven. - Drag your
ConvoCoreConversationDatainto the Source Conversation field. - Click Sync Rows From Conversation.
Each row now shows a language tag and an Event Path text field. The AudioClip slot is hidden — it is not used by the FMOD backend.
4. Enter FMOD Event Paths
For each row, type the full FMOD event path that corresponds to that line and locale:
event:/VO/CharacterA/TownSquare_Greeting_EN
event:/VO/CharacterA/TownSquare_Greeting_FR
These paths must exactly match events that exist in your FMOD Studio project and have been built into a bank that is loaded at runtime.
If the same event path is used for all locales (e.g. your FMOD project handles localisation internally via parameters or banks), enter the path on the language-agnostic (any) row and delete the locale-specific rows. ConvoCore will use the (any) entry as a fallback for any language.
5. Assign the Manifest to the Conversation
Open your ConvoCoreConversationData asset and drag the manifest into the Audio Manifest field.
6. Load Your FMOD Banks
FMOD events must be in a loaded bank before ConvoCore tries to play them. You have two common options:
- FMOD Studio Settings (Master Bank auto-load): In Edit → FMOD Studio → Edit Settings, enable auto-loading of the banks that contain your VO events.
- FMODUnity.StudioBankLoader component: Add this component to a scene object and specify the bank names. It loads them on
Awake.
If an event path is correct but the bank is not loaded, RuntimeManager.CreateInstance will silently fail and no audio will play. Always verify that the bank containing your event is loaded before the conversation starts.
7. Press Play
When the conversation reaches a voice line:
- ConvoCore calls
ResolveEventKeyon the manifest to find the event path for the current line and language. - It wraps the path in a
ConvoCoreAudioEventKeyReferenceand passes it toConvoCoreAudioProviderFMOD.PlayVoiceLine. - The provider calls
RuntimeManager.CreateInstance(eventPath), then.start()and.release(). - If the line's progression is
AudioComplete, ConvoCore pollsIsPlaying(backed bygetPlaybackState) until the event stops.
How the FMOD Provider Works
The sample provider uses CreateInstance rather than PlayOneShot so that IsPlaying returns accurate state for AudioComplete progression:
_instance = RuntimeManager.CreateInstance(keyRef.EventKey);
_instance.start();
_instance.release(); // hands ownership to FMOD; instance remains queryable
Calling .release() immediately after .start() is the idiomatic FMOD pattern. It tells FMOD that your code no longer needs to manage the instance's lifetime; FMOD automatically cleans it up when the event stops. The EventInstance struct remains valid and getPlaybackState continues to work until the event reaches the STOPPED state.
IsPlaying returns false when getPlaybackState returns PLAYBACK_STATE.STOPPED, which triggers AudioComplete advancement.
Inspector Reference
Audio Manifest (FMOD mode)
| Field | Description |
|---|---|
| Audio Backend | Must be FMOD. |
| Mode | Conversation Driven or Standalone. |
| Source Conversation | The conversation to sync rows from. |
Entry Row (FMOD mode)
| Column | Description |
|---|---|
| Language | The locale this event applies to. (any) matches all locales. |
| Event Path | The full FMOD event path, e.g. event:/VO/CharA/Line001. |
Troubleshooting
No audio plays and no FMOD errors appear.
- Verify the bank containing your events is loaded before the conversation starts.
- Verify the event path in the manifest exactly matches the path in FMOD Studio (paths are case-sensitive).
- Check that the
ConvoCoreAudioProviderFMODcomponent is assigned to Audio Provider Object on the ConvoCore runner.
Conversation stalls on AudioComplete lines and never advances.
- Verify that
ConvoCoreAudioProviderFMODis attached and the Audio Provider Object field is wired up. If the provider is missing,IsPlayingis never polled and theWaitForAudioCompleteloop runs until its 300-second safety cap.
AudioComplete advances too early, cutting off the audio.
- This can happen if the event is a one-shot and the
getPlaybackStatepoll catches it in the briefSTARTING→PLAYING→STOPPEDtransition before the next poll. Ensure the event has audible content and the bank is fully loaded. You may also add a smallSTOPPINGstate check; see the FMODPLAYBACK_STATEdocumentation for details.
Wiring works in editor but not in a build.
- Make sure your FMOD banks are included in the build. Check Edit → FMOD Studio → Edit Settings → Build and verify the bank paths are correct.