插件推荐unity

[Unity 3d] 异形屏UI布局解决方案 - NotchSo

2019-09-19  本文已影响0人  雨落随风

解决缺口/切口屏幕手机UI布局问题的一组组件和工具

GitHub 上的工程多如繁星,有些好的仓库,但凡不经意间错过了就很难找回,故稍作采撷,希望能帮助到有心人。

简介:

A set of components and tools to solve notched/cutout phones layout problems for Unity. Whether you like it or not, the time has come for us designers to design in context of a notch and embrace it instead of hiding it. This tool also enables design-time preview which help you iterate your design without building the game. Minimum Unity version 2019.1.
- 一套用来解决 Unity 中缺口/切口手机UI布局问题的组件和工具。 不管你喜欢还是不喜欢,带缺口的全面屏就在那里,于是我为它设计了这个适配工具。 该工具还允许设计时预览,都不需要打包调试吼。

功能:

Components : Attach to your game objects to make them notch-aware.
组件式 - 挂载插件提供的组件即可实现异形屏的缺口规避

  1. SafeAreaPadding: RectTransform layout component for uGUI based on the value returned by Screen.safeArea.
    - 基于 Screen.safeArea 返回值的UGUI RectTransform 布局组件
  2. Adaptation Components: Adapts any game object with Animation Playables API and Animator component.
    - 适配任意的挂载 / 使用了Animation Playables API 和 Animator 组件的游戏对象
    • AspectRatioAdaptation: Dynamically changes anything based on the ratio of the screen.
      - 根据屏幕的比例动态更改任何内容
    • SafeAreaAdaptation: Dynamically changes anything based on the safe area.
      - 根据安全区域(safe area)动态更改任何内容

Simulation : Iterate your design in context of notch right from Unity editor.
可仿真 - 让你无需真的打包安装到手机就能以所见即所得的仿真方式调试与设计与迭代

测试仿真效果,注意看左右翻页按钮在勾选仿真后向中心靠拢了

使用:

  1. 只需在工程 Package/ manifest.json 插入一行 "com.e7.notch-solution": "git://github.com/5argon/NotchSolution.git"就能通过 Unity PackageManager 安装。当然直接直接下载使用啦。
  2. Android 需勾选位于 Resolution and Presentation 下的 “Render outside safe area” 。


演示:

链接:

5argon/NotchSolution

结语:

本文集持续更新ing,喜欢记得点赞关注哦!

上一篇 下一篇

猜你喜欢

热点阅读