Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Animation Event Method Has No Receiver Error.

Discussion in 'Animation' started by todddalton, Aug 1, 2020.

  1. todddalton

    todddalton

    Joined:
    Jul 26, 2020
    Posts:
    1
    I'm really new to Unity and am working through the RayWenderlick tutorials. I've been mod'ing the examples to try and learn more.

    https://www.raywenderlich.com/6570-introduction-to-unity-ui-part-1#toc-anchor-007

    There's an animation to slide a button off the screen and I'd like to start the game as soon as the animation finishes. But after adding and setting up an event in the animation timeline I get this error:

    Screenshot 2020-08-01 at 19.56.07.png

    I've seen answers on this forum about Coroutines and there's other forums with questions about the same error messages but they don't solve my issue (they mainly seem to centre around the fact that there's two animation events and the duplication is causing issue).

    Here's a screenshot of the only animation event in my project:

    Screenshot 2020-08-01 at 19.53.04.png


    And this is the StartButtonEndAnimationScript:

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.SceneManagement;

    public class StartButtonEndAnimationScript : MonoBehaviour
    {
    public bool shouldStartGame = false;
    // Start is called before the first frame update
    void Start()
    {
    }

    // Update is called once per frame
    void Update()
    {
    }

    public void KickOffGame() {
    Debug.Log("Ended");
    }
    }
     
unityunity