UnityException: Make sure USB debugging has been enabled and that the device has authorized this computer.

Check your device, in most cases there should be a small icon in the status bar telling you if the USB connection is up.

If you are sure that the device is attached then it might be USB driver issue, for details please check 'Android environment setup' section in Unity manual.

UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()



Resolution

Disconnect the computer debugging mode and reconnect it.

This can happen if the computer registration disappears.



Developer Mode > Uncheck USB Debugging > Check it again


How to do developer mode

https://www.litenews.shop/2022/04/android-developer-mode.html

how to do developer mode