LoginSignup
0
0

More than 3 years have passed since last update.

Animation Eventの使い方

Last updated at Posted at 2020-12-05

この記事でできること

  • animationを使用して、関数を呼び出すことができます。
  • animation eventのレシピの末尾にあるよ!

animationで似たような派生テクニック

つくりかた

無題.png

ダウンロード.gif

  • 関数を作ります。今回はテスト用なので、シンプルにコンソールに"HelloWolrd!!"を表示させます。

using UnityEngine;

public class testDebug : MonoBehaviour
{
    void Hello()
    {
        Debug.Log(" ----- HelloWorld!! ----- ");
    }
}

  • animationのタイムラインで、「Add event」をクリックします。

無題.png

  • インスペクターウィンドウで、関数を選択します。(事前に、スクリプトはオブジェクトにアタッチしております)

無題.png

  • 実行すると、animationの指定のタイムラインで、関数が実行されます。

無題.png

AnimationEventのレシピ集

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0