O
O
Oleg Hwang2020-12-19 14:46:39
C++ / C#
Oleg Hwang, 2020-12-19 14:46:39

Error CS1061 does not contain a definition for 'x' and an available extension method could not be found. What should I do?

hello. I'm trying to recreate the game, and at the same time I'm learning how to create games. I found one tutorial where people make control of a character in 3rd person, a joystick and a shooter. But he made the game on the 2017 assembly of the unit, apparently because of this, errors in the code come out. please tell me how to fix these errors.
Most interested in errors with "x" and "y"

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityStandardAssets.Characters.ThirdPerson;

public class ThirdPersonInput : MonoBehaviour
{
public FixedJoystick LeftJoystick;
public FixedJoystick RightJoystick;
public FixedButton Button;
protected ThirdPersonUserControl Control;

protected float CameraAngel;
protected float CameraAngelSpeed;

// Start is called before the first frame update
void Start()
{
Control = GetComponent<ThirdPersonUserControl>();
}

// Update is called once per frame
void Update()
{
Control.m_Jump = Button.Pressed;
Control.Hinput = LeftJoystick.InputVector.x;
Control.Vinput = LeftJoystick.InputVector.y;
CameraAngel + RightJoystick.InputVector.x = CameraAngelSpeed;
Camera.main.transform.position = transform.position + Quaternion.AngleAxis (CameraAngel, Vector3.up) * new Vector3(0, 3, 4);
Camera.main.transform.rotation = Quaternion.LookRotation(transform.position + Vector3.up * 2f - Camera.main.transform.position,Vector3.up);
}
}

here are the errors

Ошибка CS1061 "FixedButton" не содержит определения "Pressed", и не удалось найти доступный метод расширения "Pressed", принимающий тип "FixedButton" в качестве первого аргумента (возможно, пропущена директива using или ссылка на сборку). Assembly-CSharp D:\UNITY\Scifisoldier\Assets\ThirdPersonInput.cs 25 Активные

Ошибка CS1061 "object" не содержит определения "x", и не удалось найти доступный метод расширения "x", принимающий тип "object" в качестве первого аргумента (возможно, пропущена директива using или ссылка на сборку). Assembly-CSharp D:\UNITY\Scifisoldier\Assets\ThirdPersonInput.cs 26 Активные

Ошибка CS1061 "object" не содержит определения "x", и не удалось найти доступный метод расширения "x", принимающий тип "object" в качестве первого аргумента (возможно, пропущена директива using или ссылка на сборку). Assembly-CSharp D:\UNITY\Scifisoldier\Assets\ThirdPersonInput.cs 28 Активные

Ошибка CS1061 "object" не содержит определения "y", и не удалось найти доступный метод расширения "y", принимающий тип "object" в качестве первого аргумента (возможно, пропущена директива using или ссылка на сборку). Assembly-CSharp D:\UNITY\Scifisoldier\Assets\ThirdPersonInput.cs 27 Активные

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question