Cocos Creator 3.4.0 set Fit Height and Fit Width in scripts

Hi all, in previous version of Cocos was possibility to set Fit Height and Fit Width in code, but in new version I don’t see these properties in the Canvas Component.

I can ask engineering to have a look.


maybe you want this?
(project ->> project settings ->> project data)
code:

cc.view.setResolutionPolicy(ResolutionPolicy.FIXED_WIDTH)

cc.view.setDesignResolutionSize(width,height,ResolutionPolicy.FIXED_WIDTH)

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.