public static void Play(AC.Char speaker, string name, AudioClip audioClip) { #if FaceFXIsPresent FaceFXControllerScript_Base fcs = speaker.GetComponent <FaceFXControllerScript_Base>(); if (fcs == null) { fcs = speaker.GetComponentInChildren <FaceFXControllerScript_Base>(); } if (fcs != null) { speaker.isLipSyncing = true; fcs.PlayAnim("Default_" + name, audioClip); } else { Debug.LogError("No FaceFXControllerScript_Base script found on " + speaker.gameObject.name); } #else Debug.LogError("The 'FaceFXIsPresent' preprocessor define must be declared in the Player Settings."); #endif }