Hello everybody,
I found myself in a situation where my game does not accurately fit into the screen on all devices (specifically, Desktop + iPhone + iPad but I am guessing the situation with Android is much more segmented).
So, my first hunch was to do a device testing function, and adjust the distance of the camera accordingly (this is a fixed-position camera, looking at the game field).
While trying to answer my own question, I found these links on the subject:
- iPhone.generation - detect device + generation. Problematic solution, new devices will be left out.
- SystemInfo.deviceType - only helps in differentiating between Handheld / Desktop
- Application.platform - same problem as above, differentiate between iPhone player and desktop.
- Platform Dependent Compilation - compile time directives, same problem.
- Screen
My questions are:
- Is this the correct approach? Should I use device detection or screen size detection?
- Did I miss any function that lets me simply ask “Is this an iPhone of ANY generation?” or “Is this an IPad of any generation?”
Thanks in advance.