Hysen Labs
Open-source project
johnsoncodehk/unity-ui-controller avatar
johnsoncodehk

unity-ui-controller

Game UI panel controller

50 stars3 forksC#License varies
01
DEEP OPEN-SOURCE ANALYSIS

unity-ui-controller, v3 without the hidden behavior

A Unity UI panel controller whose v3 stops auto-activating or auto-hiding GameObjects, removing hidden logic while the examples show how to get the same effect explicitly.

02
DEEP OPEN-SOURCE ANALYSIS

What it is and where it goes

unity-ui-controller is a game UI panel controller for Unity, a small piece of tooling for managing UI panels in a game, which in practice means handling the show and hide lifecycle of panels and the GameObjects behind them. Setup is a single step: add the listed lines to Packages/manifest.json in the Unity project, under the dependencies section, and Unity resolves the package from there. That is the whole installation story in the README.

03
DEEP OPEN-SOURCE ANALYSIS

The v3 change

The main difference between v3 and v2, the last AssetStore release, is that v3 no longer assumes the use case. Where v2 would automatically activate a GameObject when a panel is shown, or automatically disable one on hide, v3 does neither by default. The change was made to remove hidden intermediate logic, so the controller no longer does things behind the caller's back.

04
DEEP OPEN-SOURCE ANALYSIS

Why it matters

For a UI framework, the removal of assumed behavior makes the controller's actions explicit, which is easier to reason about and debug, and it keeps the framework from guessing what a developer wants. v3 can still produce the old behavior, and the examples show exactly how, just explicitly. In practice that trades a little convenience for a lot of predictability, and for anyone who found v2's auto-activation surprising, the change reads as a fix rather than a feature cut.

05
DEEP OPEN-SOURCE ANALYSIS

Editorial conclusion

The v3 release exists mainly to take assumed behavior out of the controller, and the examples show the explicit way to reproduce what v2 did for you.

06
DEEP OPEN-SOURCE ANALYSIS

Official sources

07
Community notes

Community notes