InteractableHandlerInitializer - jimdroberts/FishMMO GitHub Wiki

Description

InteractableHandlerInitializer is a ScriptableObject initializer for registering interactable handlers in the FishMMO server. It implements the handler registration interface and centralizes the registration logic for all interactable types.


API Access

Methods

  • public void RegisterHandlers()

    Registers all interactable handlers with the InteractableSystem.


Basic Usage

Setup

  1. Create an instance of InteractableHandlerInitializer as a ScriptableObject in your project.
  2. Call RegisterHandlers during server initialization to register all interactable handlers.

Example

// Example 1: Registering interactable handlers
interactableHandlerInitializer.RegisterHandlers();

Best Practices

  • Use this ScriptableObject to centralize and manage handler registration for maintainability.
  • Register all necessary handlers before accepting player interactions.
  • Update the registration logic as new interactable types are added to the game.
⚠️ **GitHub.com Fallback** ⚠️