cocos / cocos-engine

Cocos simplifies game creation and distribution with Cocos Creator, a free, open-source, cross-platform game engine. Empowering millions of developers to create high-performance, engaging 2D/3D games and instant web entertainment.
https://www.cocos.com/en/creator
Other
8.49k stars 1.98k forks source link

Preview in Editor doesn't resize Canvas UI #14031

Open BenoitFreslon opened 1 year ago

BenoitFreslon commented 1 year ago

Cocos Creator version

3.7.0

System information

macOS

Issue description

I'm using UI Canvas to get a responsive UI. I tested in editor with the "Preview in Editor" feature but the canvas doesn't resize.

Relevant error log output

No response

Steps to reproduce

Create a Canvas with Node with "Widget" components.

I click on the "Rotate" button to test. image image

However it works OK in the browser.

image

image

Minimal reproduction project

No response

pandamicro commented 1 year ago

I guess the reason is the UI haven't receive any resize event from the Preview window