0

Beginner here trying to follow a tutorial on youtube but two scripts wont reference correctly and keep getting error CS1061 on code snippet GetAxisValue.

https://www.youtube.com/watch?v=PsAbHoB85hM&t=589s

here are two code snippets

Part of PanZoom.cs script

 float x = inputProvider.GetAxisValue(0);
 float y = inputProvider.GetAxisValue(1);
 float z = inputProvider.GetAxisValue(2);
 if (x != 0 || y != 0)
    {
        PanScreen(x, y);
    }

And this is what im trying to access in CinemachineInputProvider.cs

public virtual float GetAxisValue(int axis)
    {
        var action = ResolveForPlayer(axis, axis == 2 ? ZAxis : XYAxis);
        if (action != null)
        {
            switch (axis)
            {
                case 0: return action.ReadValue<Vector2>().x;
                case 1: return action.ReadValue<Vector2>().y;
                case 2: return action.ReadValue<float>();
            }
        }
        return 0;
    }

1 Answers1

0

FIXED: Just reinstalled Cinemachine.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 17 '22 at 20:42