I need to convert this from Javacript to C#, but it doesn't seem to work...
var ray = Camera.main.ScreenPointToRay(Input.mousePosition);
if (Input.GetMouseButtonDown (0))
{
if (Physics.Raycast (ray, hit, 100))
{
if (! selectedCard)
{
DoSomething();
}
}
}
Works perfectly on both Windows AND Android.
But when i convert this to C#, it only works on Windows.... Android Input's are not recognized...
Why is that? What do i have to do to get this working?
ray = Camera.main.ScreenPointToRay (Input.mousePosition);
if (Input.GetMouseButtonDown (0))
{
if (Physics.Raycast (ray, out hit, 100))
{
if (! selectedCard){
DoSomething();
}
}
}
↧