Hello,
I’ve got this code:
if(Input.GetMouseButton(0)) { animation.Play("attack"); }
But now it wants to play the “attack” animation on the watermark, and not on the game object I want.
I get this error: MissingComponentException: There is no ‘Animation’ attached to the “UnityWatermark-small” game object, but a script is trying to access it.
You probably need to add a Animation to the game object “UnityWatermark-small”. Or your script needs to check if the component is attached before using it.
So when I hit the watermark GUI, it must play the attack animation on a other game object.
Oh and by the way I think it must be something like if(Input.GetTouch) because it’s for android.
Who can help me with this? Thanks!