@ch1ps01

Из-за чего ошибка?

using UnityEngine;
using UnityEngine.InputSystem;

public class CamControl : MonoBehaviour
{
    private PlayerInput _inputPlayer;

    private void Awake()
    {
        _inputPlayer = new PlayerInput();
    }

    private void OnEnable()
    {
        _inputPlayer.Enable();
    }

    private void OnDisable()
    {
        _inputPlayer.Disable();
    }

    private void OnGetTouch(InputAction.CallbackContext context)
    {

    }
}


из-за чего ошибка? 'PlayerInput' does not contain a definition for 'Enable' and no accessible extension method 'Enable' accepting a first argument of type 'PlayerInput' could be found (are you missing a using directive or an assembly reference?)
  • Вопрос задан
  • 104 просмотра
Решения вопроса 1
freeExec
@freeExec
Участник OpenStreetMap
Нет такого метода .Enable()
Ответ написан
Пригласить эксперта
Ответы на вопрос 1
@EEEEEEEEEEEEEEErsa
Проблема в .Enable() или .Disable()
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы