MaskCanvasTypeSettings - jimdroberts/FishMMO GitHub Wiki
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.
-
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.
- Ensure
MaskCanvasTypeSettings
is registered in your canvas settings map forMask
components. - Extend the class or modify
ApplySettings
to add custom mask settings as needed.
// Example usage in a canvas crawler or theming system:
var mask = myGameObject.GetComponent<Mask>();
var settings = new MaskCanvasTypeSettings();
settings.ApplySettings(mask, configuration);
- 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.