How To Stop Writing View-Classes for Unity UI
summary
Library that attaches a stateful component to a prefab root and generates named roles, containers and nested internal components so code uses one reference instead of many serialized fields. It reduces view-class code, generates copy API and markdown docs, previews animations in edit-mode animation preview, and organizes up to ~50 states into a state tree. Available as a Unity package on GitHub, it returns state application duration (longest animation) and is used in production.
AI-written summary · about
chapters (26)
- 0:00Introduction to the speaker and topic
- 1:08Scope of the conversation on Unity UI architectures
- 2:36Flaws in traditional view-class implementations
- 5:03Performance issues with animator-based UI solutions
- 7:30Limitations of animation component approaches
- 8:35Challenges with data binding in Unity UI
- 10:24Introducing stateful UI and its origins
- 12:58Markup and element references in stateful components
- 14:43Localization support in stateful UI
- 16:09Reusing internal components with stateful UI
- 17:15Dynamic content with container views
- 19:21Defining and managing UI states
- 21:55State descriptions and supported operations
- 24:23Customizing animations and canvas groups via states
- 25:51Animator support and state nesting
- 26:59Reusing prefabs with stateful components
- 28:43Initial states and reset behavior
- 30:28Managing complex state dependencies with state trees
- 34:25API and documentation generation features
- 35:50Benefits of stateful UI for teams and workflows
- 37:16Future roadmap and additional features
- 38:20Q&A: Adding stateful UI to existing projects
- 40:54Q&A: Reducing UI implementation time
- 42:19Q&A: Non-developers and state configuration
- 43:00Q&A: Managing state transitions and durations
- 44:27Q&A: Object pooling in container views








