This Unity3D codebase provides a flexible and scalable framework for managing UI views with transition animations. The framework uses a state machine pattern to handle view states and transitions, ensuring smooth animations and transitions between different views.
- IState: Defines the interface for a state with methods to enter, update, exit, and interrupt the state.
- IView: Defines the interface for a view with generic view types. Inherits from IState and includes additional properties and methods specific to view animations and transitions.
- View: An abstract class representing a UI view. Implements IState and manages view states using a state machine (StateMachine class). Provides methods for initializing the view, setting animation clips, and handling transitions.
- ViewController: A class for managing multiple views. Uses a dictionary to map view types (TEnum) to IView instances. Facilitates transitioning between views.
- StaticState: A class representing a static state for a view. Implements IState and provides actions to perform when entering and exiting the state.
- TransitionState: A class representing a transition state for a view. Implements IState and manages transition animations.
- StateMachine: A class for managing the current state of a view. Facilitates transitioning between states and handles interruptions.
Demo.mp4
Live demo on itch.io https://jwho303.itch.io/unity-view-state
"Silent" game GUI asset set by Prinbles https://prinbles.itch.io/silent