Search Unity

How to find the animation event from Inspector

Discussion in 'Animation' started by chan1600_unity, Sep 24, 2019.

  1. chan1600_unity

    chan1600_unity

    Joined:
    Sep 24, 2019
    Posts:
    2
    Hi,

    I just get start on learning Unity.
    I downloaded the assert Unity Chan from Assert Store, and try to learn how to control a 3D model.
    There is a sample Scene "locomotion" which has a C# script Auto Blink and Face Update on the model.
    I am trying to learn how it controls the Eye Blinking, however, I cannot find one of the configuration.
    In Face Update Script, it has a onCallChangeFace function, and I think it is for the part where the model to control the face override the original clip animation on face. However, I cannot find where it set the Event.

    In Animator, it defaults loops in a idle states with a WAIT00 animation Clips. But I do not see the Event in the clip too, or in the inspector.

    Is there anyway I can track down where the event is set from? Thanks

    function in FaceUpdate
    Code (CSharp):
    1.     public void OnCallChangeFace (string str)
    2.         {
    3.             int ichecked = 0;
    4.             foreach (var animation in animations) {
    5.                 if (str == animation.name) {
    6.                     ChangeFace (str);
    7.                     break;
    8.                 } else if (ichecked <= animations.Length) {
    9.                     ichecked++;
    10.                 } else {
    11.                     //str指定が間違っている時にはデフォルトで
    12.                     str = "default@unitychan";
    13.                     ChangeFace (str);
    14.                 }
    15.             }
    16.         }
    17.  
     
    Last edited: Sep 24, 2019
  2. chan1600_unity

    chan1600_unity

    Joined:
    Sep 24, 2019
    Posts:
    2
    Somehow the sample Scene [Locomotion] would not shows the Events under Inspector, however, when I create new scene my own and add a event, the script would work. weird.