Resolution Scaling and DPI not working at runtime?

Hello,

I’ve been playing with the Resolution Scaling setting in the Player Settings and Resolution Scaling Fixed DPI Factor (RSFDPI) in the Quality Settings and either I’m misunderstanding how this is supposed to function or it’s not working properly. By the way I’m using Unity 2017.4.10f1 and running on iOS. The ultimate goal is to be able to lower the DPI for older devices at startup so that I can get decent performance.

I’ve tried various combinations after looking at documentation but they don’t seem to be working at runtime. When I set the Resolution Scaling to Fixed DPI and set some value for Target DPI, then adjust the RSFDPI in the editor and run on device I see the DPI changes take effect (that is good). However if I leave RSFDPI at 1 in the editor and instead use QualitySettings.resolutionScalingFixedDPIFactor in Awake() or Startup() I don’t see the setting being applied. I’m considering opening a bug but wanted to check beforehand with everyone in case I’m doing something wrong.

Thanks for any advice. Regards

Nobody is seeing this? Bump.

AFAIK you need to set the quality level run time and not that property directly.

The idea is that you set different quality levels including and excluding expensive features and then you can switch level back and forth depending on the device you’re running on.

Disclaimer: I may be wrong, I haven’t done it myself yet, it’s just my understanding the Quality Settings manual after reading it. And I can’t check it at the moment.

Also this is more of a Scripting question not editor.

1 Like

Interesting. I’ll give it a shot. Thank You. If that is the case however, what is the point of exposing QualitySettings.resolutionScalingFixedDPIFactor API at all, I wonder.

To set the value FOR the levels. I think you can create quality levels from script.

1 Like

That would make sense. So you’d only be able to use this in Editor scripts then, and not run-time in-game scripts. I’ve never written any Editor plugins so don’t know if that’s the case, but shouldn’t this API then be under UnityEditor section of the documentation. If not I then doc should at least mention that it’s Editor only API. I’m not trying to give you a hard time by the way, just trying to figure out if this is a bug, or documentation change that should be made. That’s all. Thanks.

I’ve setup different Quality Levels with different scaling factor and setting the quality level at startup does indeed change the DPI quality. Thank You for your help.

Absolutely doesn’t work here on iOS. Using QualitySetting.SetQualityLevel at runtime doesn’t do anything…

I’m still on 2017 and it worked for me when I tried it. FYI

any news on this? is not working on 2019.1 either

There a ticket open here Unity Issue Tracker - [iOS] QualitySettings.resolutionScalingFixedDPIFactor does not update in Realtime

Cant you use QualitySettings.resolutionScalingFixedDPIFactor function ? and set the target DPI in the Player settings and the on Start of the scene set the factor depending on the user selected low, mid or high setting ? I have not tested it yet just wondering if someone can clear this.

This post suggests something like that: