Open
Conversation
1. 增加设置组件内容的功能 2. puerts 新增 __setUrl 回调,用于将C#通过 icon/Label.icon 等情况设置的 url 同步到脚本层 用于修正 Tencent/puerts#1784 3. _useResize 逻辑优化,兼容旧版本的fairygui导出的二进制产物(仅GLoader内装组件生效)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
首先感谢 @xiaoguzhu 开源此优秀的UI框架。
这是我们的项目在使用 FairyGUI 开发 Unity 小游戏项目时对 FairyGUI 库做出的必要修改。这里向官方提交,方便大家使用,合并后也方便我们日后同步官方的库。
技术栈: Unity + FairyGUI + PuerTS
发布平台: 抖音小游戏/微信小游戏/Web端
每一项功能的修改都整理为单独的提交记录以方便审查。
对BUG修正这里不展开说。这里提一下一些新增的功能:
1. Dispose 流程的修改 和 onEnable/onDisable 事件
我们对 FairyGUI 实现 mobx 的 MVC 自动数据和视图绑定时为了实现数据自动绑定/解绑而做出的必要修改,onDispose 的调用顺序不正常则数据流不再可靠。 onEnable/onDisable 事件是实现自动绑定和解绑的关键功能而新增的组件,这里只有访问他们时才会创建,避免不必要的性能开销。
2. Groot 增加 popupLayer
用于指定弹窗的父容器来实现弹窗出现在UI中的某一层。
实际使用案例:
3. GLoader 3D 扩展
用于实现类似GLoader这样,通过为
url赋值来展示3D特效等内容、这里就可以通过脚本实现资源加载和释放等操作。