With entity picking, I can use those scripts to easily make these controls work with touch or mouse. Just need to know if there is a way for the game to know that a user is on a phone/tablet or not so that way i can build simple code to hide/show the relevant interface.
Generally in the web, trying to divide by platform - will lead to problems, as there are “hybrid” platforms, or simply no guaranteed way to be correct, leading to many edge cases.
Best way to do is to simply check if certain feature is supported.
If touch is supported, show touch UI. If touch is not supported, simply don’t show touch UI.
Do remember there are devices with touch and keyboard, such as many modern laptops with touch screens. In such case, show touch as before, but if user start to use keyboard, hide touch. This is of course case specific, and if you can’t imagine possibility of user using both at same time, then it is enough to do what described above.