2Dの時計アプリを作っています。
アニメーションを使うのですが、アニメーションが起動しません。Playボタンを押したときになって、使いたい時に起動しないのです。
C#
1using System.Collections; 2using System.Collections.Generic; 3using UnityEngine; 4 5public class Animation : MonoBehaviour 6{ 7 Animation anim; 8 9 void Start() 10 { 11 anim = this.GetComponent<Animation>(); 12 } 13 14 //別のスクリプトからの参照でアニメーション起動 15 public void Anim() 16 { 17 Debug.Log("OK!!"); 18 anim.Play(); 19 } 20}
Playボタンを押したらでるエラー
「The AnimationClip 'New Animation' used by the Animation component 'Button' must be marked as Legacy.
」
動いてほしい時に出るエラー
「Default clip could not be found in attached animations list.」
Play Automaticallyのチェックは外してあって、debug.logはうまくうごいてます。
このプログラムがついているオブジェクトには起動させたいアニメーションがちゃんとついています。
Unityは2019.1.11f1で
ビルドするOSはAndroid7.1.1です。
何か間違いがあったら言ってください。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。