Can You Directly Determine Whether FairyGUI or UGUI Is Better for Performance?
A new project is evaluating FairyGUI and UGUI. From a performance perspective alone, can we directly determine which solution is better?
You cannot simply conclude that FairyGUI is always better than UGUI. Both solutions can achieve good performance, but they tend to have different types of performance pitfalls. With UGUI, common performance issues are often related to the Canvas system . When a UI contains many dynamic elements, improper Canvas partitioning and separation of static and dynamic elements can lead to additional overhead such as mesh rebuilding and vertex attribute updates. Operations such as , , and UI Particle effects can also become performance hotspots. FairyGUI uses a different implementation approach. Once the UI enters Unity, its rendering is closer to the rendering approach of a standard . It does not rely on the UGUI Canvas mesh rebuilding process, so issues related to static/dynamic separation and frequent vertex updates are relatively less common. However, FairyGUI is not inherently more performant . It also has its own performance limitations. Factors such as dynamic batching conditions, Renderer related properties, the number of text vertices, and how UI elements are mixed with visual effects can all affect the final performance. https://uwa overseas public.oss us east 1.aliyuncs.com/uploads/markdown/e757f0f9 b90d 4eba bf33 8c01586c57f3.png Based on experience with the projects currently encountered, UGUI tends to involve a wider range of performance issue types, while FairyGUI's issues are relatively more concentrated. This does not mean that FairyGUI is inherently faster. Both solutions can achieve good performance, so the choice should be based more on the team's existing situation: If the team already has a mature UGUI framework and optimization experience Existing experience and accumulated infrastructure already have value. There is no need to switch solutions simply because the alternative may avoid some types of performance issues. If UI production efficiency is a higher priority and the team is willing to establish new usage guidelines FairyGUI can be evaluated more closely, especially for projects with a large amount of dynamic UI where the team wants to reduce the amount of UI construction work handled by programmers. https://uwa overseas public.oss us east 1.aliyuncs.com/uploads/markdown/cbe089d3 15f5 4666 ab61 21c828b8abc7.png If the project is heavily UI oriented, it is also recommended to prepare several test scenarios that are close to actual production use cases, such as large amounts of dynamic text, frequent UI opening and closing, character previews, and mixed UI and visual effects . Compare the two solutions on the same device and with similar visual complexity. FairyGUI does not have an advantage in every scenario. It mainly avoids some of the common performance issues found in UGUI. The final choice should still be based on the team's existing experience and the project's actual UI scenarios.