From Google Translate:
Hello, I’m sorry for speaking in Spanish, it’s just that I don’t speak English perfectly.
My problem is that with Unity, when you make a video game for a cell phone, it is also played on a tablet and the entire canvas changes.
Is there any script or code to recognize if the video game is being played on a cell phone or tablet? If so, it would be of great help to me, because then I could use that script or code to make the video game work and look different when used on a cell phone or tablet.
Here are the official docs on how to make your UI handle various resolutions and aspect ratios cleanly:
Here are some notes on UI Anchoring, Scaling, CanvasScaler, etc:
Usually you need to choose a suitable ScaleMode and MatchMode in the Canvas Scaler and stick with it 100%. Generally if you change those settings you will often need to redo your UI entirely.
I also use this CanvasScalerOrientationDriver
utility to make sharing UI for Landscape / Portrait easier. Read what it does carefully.