> For the complete documentation index, see [llms.txt](https://santutu.gitbook.io/rts-selection-system/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://santutu.gitbook.io/rts-selection-system/extra-customization/afocusgrouphandler.cs.md).

# AFocusGroupHandler.cs

Abstract class for moving the camera to a specific group:

```csharp
public abstract class AFocusGroupHandler : MonoBehaviour
{
    public abstract void FocusGroup(IReadOnlySelectables 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`.(Referencing `SimpleFocusGroupHandler.cs` is a good starting point.)

  Inject the implemented AFocusGroupHandler class into `GroupSelectionInputHandler.focusGroupHandler in` hierarchy view`.`
