Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Screen.DPI

Discussion in 'Android' started by artanist, Aug 18, 2019.

  1. artanist

    artanist

    Joined:
    Oct 28, 2014
    Posts:
    61
    Hello, I need to use the function Screen.DPI on android and I read the doc at this link : https://docs.unity3d.com/ScriptReference/Screen-dpi.html. After that, I look at the forum thread indicated in the doc that point to the following link : https://forum.unity.com/threads/screen-dpi-on-android.414014/

    So basically, will it return 0 when they know the densityDpi is wrong and I should use the proposed C# script in that case or it's only via actual testing that I know that something is wrong ? It's a bit confusing why Screen.DPI will return 0.