I had the same problem. This is how I solved it:
Build settings -> Player settings -> Active Input Handling -> Both
Try this. Hope it was helpful