Created
June 6, 2017 18:07
-
-
Save onionmk2/f590eb8535a133f7a15321706ce87a4b to your computer and use it in GitHub Desktop.
This file contains 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
var animator = GetComponent<Animator>(); | |
var layer = animator.GetLayerIndex("Face"); | |
// 戻り値がコレクションなのと、型がAnimatorClipInfoである(AnimationClipInfoではない)のに注意 | |
AnimatorClipInfo[] clips = animator.GetCurrentAnimatorClipInfo(layer); | |
foreach (var c in clips) | |
{ | |
print(c.clip.name + " : weight " + c.weight); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment