Quantcast
Channel: Latest Questions by LlamaNervous
Viewing all articles
Browse latest Browse all 48

Animation/Animator problems

$
0
0
I am trying to make a basic melee weapon swing when I left click. I wrote a short script to try and get it working: if (Input.GetButtonDown("Fire1")) { //Attack animation TheSystem.animation.Play("melee_attack"); Debug.Log("Clicked"); But I get this error: The animation state melee_attack could not be played because it couldn't be found! Please attach an animation clip with the name 'melee_attack' or call this function only for existing animations. UnityEngine.Animation:Play(String) MeleeSystem:Update() (at Assets/Script/MeleeSystem.js:15) In the attached object I had just the Animator component which would just play and loop automatically so I unticked that and added an animation component, selected the anim from my assets and unticked Play Automatically. Any help would be appreciated!

Viewing all articles
Browse latest Browse all 48

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>