The design of the UI framework is something that any game development has to do. It is almost the first thing a player sees when he opens a game. It is probably what the player doesn't care most about. For developers, almost every game module has a connection with the UI, and if it is not handled properly, the UI becomes a nightmare. For example, aspect ratio adaptation, resolution adaptation, pixel alignment. these are enough for inexperienced developers to waste a lot of time. Fortunately, engines like Unity provide already powerful UI solutions, as well as plugins from many other developers. But this is not enough. This article focuses on the design and optimization of UI frameworks.