Android Screen.dpi value seems off by a few pixels than manufacturer’s officially reported dpi… Where is Unity getting this value from?
Actually, vertical and horizontal dpi on much screens are different values…Unity gets either vert or horiz or average dpi. For much applications it doesn’t matter: they differ a little.
If you really need PRECISE dpi, you have to hardcode it.
For example my GalaxyS smartphone has parameters:
Screen res: 480x800, 4inch disp. Manufacturer says 233 dpi. Looks like its average : sqrt(480480 + 800 * 800)=233,3…
Unity gives 235 dpi.
My iPhone 4S :
Screen res 640x960, 3.5inch disp. Manufacturer says 330, calculation gives: sort(960960 + 640*640) = 329.65…
Unity gives 320 dpi.
So, mistake is ignorable.