unity Starter Assets 使用 新版输入系统Input system报错:
MissingMethodException: Method ‘StarterAssets.StarterAssetsInputs.OnLook’ not found
找到StarterAssetsInputs.cs
改写代码
//public void OnMove(InputAction.CallbackContext value)
public void OnMove(InputValue value)
{
MoveInput(value.Get<Vector2>());
}
public void OnLook(InputValue value)
{
LookInput(value.Get<Vector2>() * ((!OptionsManager.reverseMouse) ? 1 : (-1)));
/*if (cursorInputForLook)
{
if (value.action.activeControl != null && value.action.activeControl.device is Gamepad)
{
sensitivity = 2f;
}
else
{
sensitivity = 1f;
}
LookInput(value.ReadValue<Vector2>() * ((!OptionsManager.reverseMouse) ? 1 : (-1)));
}*/
}