MissingMethodException: Method 'Player.OnMove' 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 <cbc72d4a9767498db39486e941a498e3>:0)

UnityEngine.SetupCoroutine.InvokeMember (System.Object behaviour, System.String name, System.Object variable) (at <8744f615ca0c450898baad3219003b45>:0)

UnityEngine.Application:InvokeFocusChanged(Boolean)

UnityEditorInternal.InternalEditorUtility:OnGameViewFocus(Boolean)

UnityEditor.HostView:OnLostFocus()


์—๋Ÿฌ


using System.Collections;

using System.Collections.Generic;

using UnityEngine;

using UnityEngine.InputSystem;


public class Player : MonoBehaviour

{

ย  ย  Vector3 moveVector;

ย  ย  Rigidbody playerRigid;


ย  ย  private void Awake()

ย  ย  {

ย  ย  ย  ย  playerRigid = GetComponent<Rigidbody>();ย  ย ย 

ย  ย  }


ย  ย  private void Update()

ย  ย  {

ย  ย  ย  ย  playerRigid.AddForce(moveVector);

ย  ย  }


ย  ย  void OnMove(InputAction.CallbackContext context)

ย  ย  {

ย  ย  ย  ย  moveVector = context.ReadValue<Vector3>();

ย  ย  }

}


์ฝ”๋“œ


๋ฉ€์ฉกํžˆ ์žˆ๋Š”๋ฐ ์™œ??