'FixedJoystick' does not contain a definition for 'inputVector'.

Hi, I’ve just completed my first game in Unity but it shows me this error

Error CS1061: ‘FixedJoystick’ does not contain a definition for ‘inputVector’ and no accessible extension method ‘inputVector’ accepting a first argument of type ‘FixedJoystick’ could be found (are you missing a using directive or an assembly reference?)

Here’s the code:-
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class FixedJoystick : Joystick
{

}

I’ve try 2-3 times of reimporting Joystick Pack but it didn’t help me. Anyone help me please.

probably because you don’t have using UnityEngine.InputSystem;

The fix is in myscript.cs, not in the FixedJoystick.cs that can remain as is.
Edit your myscript.cs as follows :

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityStandardAssets.Characters.FirstPerson;
public class MyScript : MonoBehaviour
{
public FixedJoystick MoveJoystick;
public FixedButton JumpButton;
public FixedTouchField TouchField;

// Start is called before the first frame update
void Start()
{

}
// Update is called once per frame
void Update()
{
var fps = GetComponent();
fps.RunAxis = MoveJoystick.Direction;
fps.JumpAxis = JumpButton.Pressed;
fps.mouseLook.LookAxis = TouchField.TouchDist;
}
}

3 Likes