Getting the "Fit Width" and "Fit Height" flags from code

Hello!

How to get the values ​​of these flags at runtime? I use Cocos Creator 3.8.3.

You can get ResolutionPolicy through view by calling getResolutionPolicy(). But I still don’t understand what to do with it.

In general, I need to determine whether the code works for Web-Desktop or Web-Mobile. Since I have different combinations of the above flags for these assemblies, it would be possible to determine through them. Is there another way?

You can also create your own macros and determine by them. But here I saw a problem. I want to build via the command line. How to manipulate macros in this case?

you can read the docs in Cocos website, there are a lot of info about resolution policy, there is the link:Auto Fit for Multi-Resolution | Cocos Creator