Fun and simple. But it can be easily exploited with diagonal movement. Since you are using unity you should use the .normalize command in your movement input.
I found this simple example: https://www.codegrepper.com/code-examples/csharp/unity+normalize+movement