AnimationEventの引数にはシーン上のGameObjectは指定できない

AnimationEvent

https://docs.unity3d.com/2020.1/Documentation/ScriptReference/AnimationEvent.html

 

例えばCameraオブジェクトにAnimatorがついていてスクリプトが何もない場合

Functionはテキストベースになる

 

 

アニメーターの中に該当アニメーションを入れてあげて

 

 

スクリプトをつけると

 

プルダウンメニューとして表示されるようになる

既に何か設定した後だとリセットしないと表示されないかも?

 

で、こんな関数だったとして

AnimationEventでゲームオブジェクトを指定できそうだけど

シーン上のオブジェクトは指定できない。

Assts内のPrefabなら可能

 

 

 

関連記事


Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 44

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 45

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 46

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 44

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 45

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 46

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 44

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 45

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 46

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 44

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 45

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 46

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 44

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 45

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 46

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 44

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 45

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 46

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 44

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 45

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 46

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 44

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 45

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 46

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 44

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 45

Warning: Trying to access array offset on false in /home/sirohood/sirohood.exp.jp/public_html/wp-content/themes/oria/single.php on line 46



コメントを残す

※コメントは承認後に表示されます。
 コメントを公開されたくない場合、名前の後に「:非公開」とつけてください。