В настоящее время она вызывает простую функцию, которую я Я вызывал другие методы, кроме системы ввода (которая работает полностью так, как задумано), но по какой-то причине каждый раз, когда я связываю его с системой ввода и выполняю нажатие кнопки во время работы моей программы, я получаю эту ошибку утверждения.
Код: Выделить всё
Assertion failed
UnityEngine.InputSystem.LowLevel.NativeInputRuntime/c__DisplayClass10_0:b__0 (UnityEngineInternal.Input.NativeInputUpdateType)
UnityEngineInternal.Input.NativeInputSystem:NotifyBeforeUpdate (UnityEngineInternal.Input.NativeInputUpdateType)
Код: Выделить всё
private void OnEnable()
{
interactionControls.Enable();
drop = interactionControls.UI.RemoveItem;
drop.Enable();
drop.performed += Drop;
}
private void Drop(InputAction.CallbackContext context)
{
if (menuActive)
{
drop.Disable();
List inv = ReturnInventoryItems();
BaseItem item = inv[currentIndex];
inventory.Remove(currentIndex, inv);
}
}
Я использую Unity 2022.3.38f1.
Подробнее здесь: https://stackoverflow.com/questions/793 ... ion-failed
Мобильная версия