Last active
November 14, 2015 09:14
-
-
Save hecomi/8b70a7a9924eb6b13c65 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class Test : MonoBehaviour | |
{ | |
private MMD4M_LipSync lipSync_; | |
public AudioClip clip; | |
void Start() | |
{ | |
lipSync_ = GetComponent<MMD4M_LipSync>(); | |
lipSync_.OnTalkEnd += Talk; | |
Talk(); | |
} | |
void OnDestroy() | |
{ | |
lipSync_.OnTalkEnd -= Talk; | |
} | |
void Talk() | |
{ | |
lipSync_.Play(clip); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment