Unity-Technologies / com.unity.uiwidgets

UIWidgets is a Unity Package which helps developers to create, debug and deploy efficient, cross-platform Apps.
https://unity.cn/uiwidgets
626 stars 78 forks source link

不同尺寸的手机如何适配 #338

Closed xuexirong closed 2 years ago

xuexirong commented 2 years ago

如何实现类似unity的适配方式,填写设计图尺寸,然后以屏幕高度为标准进行画面的缩放,宽度自适应。 或者使用flutter的方式screenUtil那种 或者说有其他更好的实现方式?有没有文档呢?

zhuxingwei commented 2 years ago

Hi Thanks for the question !

Yes you can port any existing solutions from flutter (e.g., screenUtil) to UIWidgets directly to solve your problem.

However, I am very sorry that since the dev team has neither a plan or a clear picture of this NEW feature before, we cannot help you with any official solution or documentation at this very moment.

Personally, according to my understanding, maybe you can work with Unity side configurations like Canvas Scaler and specific Anchor mode to address this issue?

xuexirong commented 2 years ago

@zhuxingwei 好的 这两种方案我都试一下,谢谢