How and where to set resolution policy to EXACT_FIT

How and where to set resolution policy to EXACT_FIT
0

hi,
I want to know how and where in code can I set the cc.ResolutionPolicy to cc.ResolutionPolicy.EXACT_FIT. I tried the following in onLoad() of one of my scripts but this failed:

cc.ResolutionPolicy.apply(cc.ResolutionPolicy.EXACT_FIT);

I also tried the following :

cc.view.setResolutionPolicy(cc.ResolutionPolicy.EXACT_FIT);

but it didn’t do anything.
please guide…
thanks!

In Creator, we use Canvas’ Fixed Width or Height to adjust the game screen.

You can even make your game responsive just by changing these two properties.