0

This is my simple code - I'm using Visual Studio 2017, and assume the issue is with the libraries that contain the functions Input."" are not being found.

There is no auto complete, when I start to type Input."" and there are no colours indicating it's a prewritten function. Could anyone help?

I've been stuck trying to figure out how to make this work and I'm completely stalemated (btw even when I type 0.5f it does not colour up like it does when I watch other people code this).

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerController : MonoBehaviour
{
    public float moveSpeed;

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

    // Update is called once per frame
    void Update()
    {
        if (Input.GetAxisRaw("Horiztonal") > 0.5f)
        {
            transform.Translate(new Vector3(Input.GetAxisRaw("Horiztonal") * moveSpeed * Time.deltaTime,0f,0f));
        }
    }
}
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Input is a UnityEngine method, so if the includes are ther it should not show as error. try doing "assets/open c# project" – zambari Mar 11 '19 at 16:31
  • Check [this](https://answers.unity.com/questions/1585929/miscellaneous-files-making-scripts-not-work.html) for the solution. Most likely you have the same issue – Ali Kanat Mar 11 '19 at 16:32
  • Possible duplicate of [Autocompletion not working in Visual studio](https://stackoverflow.com/questions/42597501/autocompletion-not-working-in-visual-studio) – Ali Kanat Mar 11 '19 at 16:35
  • the only errors I get is "the referenced script (unknown) on this behaviour is missing" – Yasser Saleem Mar 11 '19 at 16:36
  • 1
    Thanks Ali, I think I just need to go through their solutions, and it should fix it. Looks like that guy did have the same problem as me. – Yasser Saleem Mar 11 '19 at 16:45

0 Answers0