PixelCrushers Dialogue System Integration
Overview

The integration can be found in Assets/Plugins/CrystalLipSync/Integration Packages/
The CrystalDialogueSystemLipSync component (in the Inspector shown as Dialogue System Text Lip Sync) bridges PixelCrushers Dialogue System with CrystalLipSync's text-driven lip sync. When a dialogue line is delivered, it automatically:
Reads the subtitle text
Resolves which character is speaking
Finds their
CrystalTextLipSynccomponentDrives mouth movement at a configurable speed
If the line has voice-over audio (via AudioWait, Audio, or Voice sequencer commands), text lip sync is skipped so the audio-driven CrystalLipSyncController handles it instead.
This integration requires no scripting. Setup takes under a minute.
Prerequisites
Before setting up the integration, make sure you have:
CrystalLipSync installed and working on your character(s)
PixelCrushers Dialogue System installed
Your characters set up with:
CrystalLipSyncControllerCrystalLipSyncBlendshapeTarget(with mapped visemes)CrystalTextLipSync
Each speaking character needs a CrystalTextLipSync component. If you used the CrystalLipSync Setup Wizard with the "Add Text Lip Sync" option enabled, this is already done.
Setup
Step 1 - Add the component to the Dialogue Manager
Select your Dialogue Manager GameObject in the scene hierarchy
Click Add Component
Search for
CrystalDialogueSystemLipSync(or navigate to CrystalLipSync → Dialogue System Text Lip Sync)Done!
That's the entire setup. The component hooks into the Dialogue System's built-in OnConversationLine / OnConversationLineEnd callbacks, which are broadcast to the Dialogue Manager automatically.
Step 2 - Configure settings (optional)
Chars Per Second
10
How fast the lip sync plays through the text. Match this to your subtitle display speed or typewriter effect. Higher = faster mouth movement.
Skip When Audio In Sequence
true
When enabled, text lip sync is skipped if the line's Sequence field contains AudioWait(...), Audio(...), or Voice(...) commands. This prevents text lip sync from conflicting with audio-driven lip sync.
Show Debug Logs
false
Prints detailed logs to the Console for troubleshooting.
How it works
The component uses the Dialogue System's SendMessage pattern. When a conversation line is delivered, the system broadcasts OnConversationLine to the speaker, listener, and Dialogue Manager GameObjects. Since the component lives on the Dialogue Manager, it catches every line from every conversation.
Audio vs Text Lip Sync
CrystalLipSync supports two lip sync modes:
Audio lip sync
Voice-over AudioClip
CrystalLipSyncController
Lines with recorded voice-over
Text lip sync
Subtitle text string
CrystalTextLipSync
Lines without voice-over
Audio lip sync (voice-over lines)
Audio lip sync needs no integration component at all. It works out of the box because both systems share the same AudioSource:
CrystalLipSyncControlleron the character references an AudioSource and performs real-time FFT analysis on whatever audio plays through itThe
DialogueActorcomponent on the same character also has an Audio Source fieldPoint both to the same AudioSource
When the Dialogue System plays a voice-over clip via AudioWait(clip, speaker), it routes the audio through the DialogueActor's AudioSource. Since CrystalLipSyncController monitors that same AudioSource, it detects the audio and drives lip sync automatically ... no callbacks, no events, no integration code.
Setup for audio lip sync
On your speaking character, ensure you have an AudioSource component
In
CrystalLipSyncController, drag that AudioSource into the Audio Source fieldIn
DialogueActor, drag the same AudioSource into the Audio Source fieldIn your Dialogue Entries, use
AudioWait(clip, speaker)in the Sequence field
That's it. When the line plays, the Dialogue System plays the clip through the shared AudioSource, and CrystalLipSync picks it up instantly.
If your character has only one AudioSource, the Dialogue System will find it automatically via GetComponentInChildren<AudioSource>() even without setting the DialogueActor.audioSource field explicitly. The explicit assignment only matters if the character has multiple AudioSources.
Text lip sync (lines without voice-over)
This is where the CrystalDialogueSystemLipSync integration component comes in. For lines that have no audio clip, there's nothing for the FFT analyzer to pick up. The integration reads the subtitle text and feeds it to CrystalTextLipSync instead.
The integration handles the two modes automatically:
With
Skip When Audio In Sequenceenabled (default): If the Dialogue Entry's Sequence field containsAudioWait(...),Audio(...), orVoice(...), text lip sync is skipped. The audio analysis inCrystalLipSyncControllerhandles lip sync from the audio signal.With
Skip When Audio In Sequencedisabled: Text lip sync plays for every line, even if audio is present. Use this only if your audio-driven lip sync is handled separately.
Example Sequences
Troubleshooting
No lip sync is happening
Enable debug logs: Check the Show Debug Logs toggle on the component and open the Console
Check the component is on the Dialogue Manager: It must be on the same GameObject as the
DialogueSystemControllerVerify CrystalTextLipSync exists on the speaker: The character's GameObject (or a child) needs a
CrystalTextLipSynccomponentVerify CrystalLipSyncController exists:
CrystalTextLipSyncrequires aCrystalLipSyncControlleron the same GameObject to apply viseme weightsCheck the Dialogue Actor is mapped: In the Dialogue System, make sure the Actor's Transform is assigned (via a
DialogueActorcomponent on the character)
Lips move but no visible blendshape changes
Ensure
CrystalLipSyncBlendshapeTargetis present with correctly mapped visemesCheck that
CrystalLipSyncController.IsActiveisfalse... if audio lip sync is active, it overrides text weights
Text lip sync plays even for voice-over lines
Enable Skip When Audio In Sequence in the inspector
Verify your voice-over lines use
AudioWait(...)orAudio(...)in the Sequence field
Lip sync speed doesn't match subtitle display
Adjust the Chars Per Second value to match your subtitle typewriter speed
Typical values:
8...15for natural pacing,20+for fast dialogue
FAQ
Q: Do I need to add anything to each character?
A: Each speaking character needs CrystalLipSyncController, CrystalLipSyncBlendshapeTarget, and CrystalTextLipSync. Use the CrystalLipSync Setup Wizard (Tools → Crystal LipSync → Setup Wizard) with "Add Text Lip Sync" enabled to set these up in one click.
Q: Can I use this alongside Game Creator 2? A: Yes. The PixelCrushers integration and GC2 integration are independent. If you use the Dialogue System for GC2 bridge package, the Dialogue System integration handles lip sync for PixelCrushers conversations.
Q: Does this work with localized dialogue? A: Yes. The component reads whatever text the Dialogue System delivers after localization. No extra configuration needed.
Q: What if my character doesn't have a CrystalTextLipSync component? A: The line plays normally without lip sync. A debug log is printed if Show Debug Logs is enabled, but nothing breaks.
Last updated