NotImplementedException

I am working on a 2D platformer game. I have called a coroutine from a function and this is the error i am getting. Please help.

UnityEngine.Events.InvokableCall.Invoke () (at :0)
UnityEngine.Events.UnityEvent.Invoke () (at :0)
UnityEngine.UI.Button.Press () (at D:/Program Files (x86)/Unity/2020.1.12f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Button.cs:68)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at D:/Program Files (x86)/Unity/2020.1.12f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Button.cs:110)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at D:/Program Files (x86)/Unity/2020.1.12f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/ExecuteEvents.cs:50)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at D:/Program Files (x86)/Unity/2020.1.12f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/ExecuteEvents.cs:261)
UnityEngine.EventSystems.EventSystem:Update() (at D:/Program Files (x86)/Unity/2020.1.12f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:376)

Error log doesn’t seem to have anything to do with a coroutine. It seems like you have clicked a button and the OnClick handler of the button is assigned to one of the following:

  • A method that doesn’t exist in your code
  • A method that has a different parameter list than actually exists in your code
  • A method that throws a NotImplementedException explicitly.

You’ve skipped the first line in your error message, which would have the exact line which has the problem. Almost certainly it’s a line containing “throw new NotImplementedException()” (which would be filled in to a method that has been implemented automatically by Visual Studio, e.g. if you did “implement interface” or “implement abstract class” from a context menu). You just need to replace that line with whatever the functionality of that method should be.

4 Likes

Thank you, the error has been resolved