I’m a beginner and don’t understand how exactly to get input from your keyboard and mouse. I really don’t completely understand getting input from anywhere. I’ve followed many tutorials, but they all do it differently and don’t explain clearly. I understand that the way you write code and vary greatly from person to person, but I don’t understand any ways that have been presented to be because they are never explained clearly.
“Best” depends on what you’re doing. The easiest way to get keyboard input is with Input.GetKeyDown, Input.GetKey, and Input.GetKeyUp. You can instead use the input manager and create joystick like axis and user configurable key layouts, but the extra layer of abstraction while useful is just another thing to go wrong for a beginner. So I’d try the ones I mentioned first.
As far as mouse input, if you’re talking button clicks you can use the similarly named Input.GetMouseButtonDown, Input.GetMouseButton, and Input.GetMouseButtonUp. Button 0 is left click for a right hand configured mouse, button 1 is right click. Again there is input manager abstraction available as well.
There’s also a new input manager I haven’t tried yet which I believe is in a preview package. You could investigate that if you’re interested.
Thank you very much