cc.ResolutionPolicy.EXACT_FIT

Hi,
I would like to know the way one can use EXACT_FIT and the conditions/steps one needs to follow to use it. Since it is code-based please also include all the dependencies, if any, for the following code in the script attached to Canvas :

onLoad () {
cc.view.setResolutionPolicy(cc.ResolutionPolicy.EXACT_FIT);
},

Note: I also tried to disable the Canvas component of the Canvas node but it still didn’t work.

Thanks!

1 Like