So I’ve been mostly doing old Gamemaker-stuff and what not before, and not too much of Unity in terms of scripting. But I’m basically trying out the basics and trying to start from somewhere. However - I can’t for the world understand what I am missing (I’m just trying to check double conditions for pushing both right and left keys). Unity says “and” doesnt exist. Am I totally writing this wrong to check double conditions? I’ve tried && also without luck, as Unity says that doesnt exist either. ![]()
Any help is greatly appreciated.
if (Input.GetKey("right")) and (Input.GetKey("left"))
{
transform.Translate(1,0,0,Space.World);
}