Version: 2020.3
public static float dpi ;


屏幕/设备的当前 DPI(只读)。

This is the actual DPI of the screen or physical device running the application. Returns 0 if unable to determine the current DPI.
Note: On Android devices this returns densityDpi which is a logical bucket that contains a range of DPI values. If you need a more precise dpi value, see this forum thread.