Hi,
In many cases, there are multiple ways to make something work in Unity, and Rick cannot show all of them. If your code works, it’s a solution by definition. I think Rick wanted to be on the safe side because we cannot know if OnJump will get called only when a key was pressed. In programming, we often check for certain things before executing a code block even though we are sure that the code will be working. A lot is going on during runtime.
Did this help?
See also:
- Forum User Guides : How to mark a topic as solved