AFocusGroupHandler.cs
Abstract class for moving the camera to a specific group:
FocusGroup(IReadOnlySelectables group)
is an abstract method that moves the camera to the given group.
Common Use Cases:
When modifications are needed to fit the project's camera system.
Defaultly SimpleFocusGroupHandler.cs
is provided :
SimpleFocusGroupHandler.mainScreen
is the RectTransform of the game screen. It focuses on objects based on the center of this RectTransform. (If it simply focuses on the absolute center of the screen, UI elements like footers or headers may interfere with proper centering.)If your project includes camera zoom and rotation features and you want to preserve the zoom, rotation state, you should implement a class that extends
AFocusGroupHandler
.(ReferencingSimpleFocusGroupHandler.cs
is a good starting point.)Inject the implemented AFocusGroupHandler class into
GroupSelectionInputHandler.focusGroupHandler in
hierarchy view.
Last updated