MaskCanvasTypeSettings - jimdroberts/FishMMO GitHub Wiki

Description

The MaskCanvasTypeSettings class is a canvas type settings handler for Unity's Mask component in the FishMMO client. It is designed to provide a hook for applying configuration-based settings to mask components, though no settings are currently applied by default.


API Access

Methods

  • public override void ApplySettings(object component, Configuration configuration)

    Attempts to cast the component to Mask and apply settings from configuration. Currently, no settings are applied by default.


Basic Usage

Setup

  1. Ensure MaskCanvasTypeSettings is registered in your canvas settings map for Mask components.
  2. Extend the class or modify ApplySettings to add custom mask settings as needed.

Example

// Example usage in a canvas crawler or theming system:
var mask = myGameObject.GetComponent<Mask>();
var settings = new MaskCanvasTypeSettings();
settings.ApplySettings(mask, configuration);

Best Practices

  • Use this class as a base for adding custom settings to mask components.
  • Register this handler in your canvas settings map to enable future theming or mask adjustments.
  • Validate component types in ApplySettings to avoid runtime errors.
  • Extend or override for custom mask behavior as your UI requirements evolve.
⚠️ **GitHub.com Fallback** ⚠️