Hi everyone i just update the VS and i have this error.(‘Input’ is an ambiguous reference between ‘UnityEngine.Input’ and ‘UnityEngine.Windows.Input’)
The code I got error:
float moveHorizontal = Input.GetAxis("Horizontal");
float moveVertical = Input.GetAxis("Vertical");
Thank you for your helps.
(I tried change code to UnityEngine.Input but i dont want to)
>Solution :
The error most probably appears because you have the following two lines at the top of your file:
using UnityEngine;
using UnityEngine.Windows;
The problem lies in the fact that both these namespaces contain a definition for Input.
As you apparently want to use UnityEngine.Input, you can do one of the following:
1) Remove the line using UnityEngine.Windows; (but this might induce another problem if you are using things defined in this namespace)
2) Add the line using Input=UnityEngine.Input; (so there is no ambiguity as to which one you want)