I get the following error in unity with nearly a blank project.
MissingMethodException: Method ‘PlayerMovement.OnLook’ not found.
System.RuntimeType.InvokeMember (System.String name, System.Reflection.BindingFlags bindingFlags, System.Reflection.Binder binder, System.Object target, System.Object[ ] providedArgs, System.Reflection.ParameterModifier[ ] modifiers, System.Globalization.CultureInfo culture, System.String[ ] namedParams) (at <75633565436c42f0a6426b33f0132ade>:0)
UnityEngine.SetupCoroutine.InvokeMember (System.Object behaviour, System.String name, System.Object variable) (at <4746c126b0b54f3b834845974d1a9190>:0)
UnityEngine.InputSystem.LowLevel.<>c__DisplayClass10_0:<set_onBeforeUpdate>b__0(NativeInputUpdateType)
UnityEngineInternal.Input.NativeInputSystem:NotifyBeforeUpdate(NativeInputUpdateType)
This is all im trying to run currently and yet it suddenly started throwing a temper tantrum about OnLook not being found while it clearly exists in the menu. I’ve started a fresh project on the side and this error continues to present itself.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class PlayerMovement : MonoBehaviour
{
Rigidbody2D rb;
Vector2 moveValue;
private void Awake()
{
//On awake we grab the main rigidbody component
rb = GetComponent<Rigidbody2D>();
}
void OnLook(InputAction.CallbackContext callback)
{
Debug.Log(callback.ReadValue<Vector2>().normalized);
}
}
Anyone know anything about this?
The issue cropped up when I accidentally linked a project with an existing Plastics repository and overrode the project.