RawImageCanvasTypeSettings - jimdroberts/FishMMO GitHub Wiki

Description

The RawImageCanvasTypeSettings class is a canvas type settings handler for Unity's RawImage component in the FishMMO client. It is designed to provide a hook for applying configuration-based settings to raw image 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 RawImage and apply settings from configuration. Currently, no settings are applied by default.


Basic Usage

Setup

  1. Ensure RawImageCanvasTypeSettings is registered in your canvas settings map for RawImage components.
  2. Extend the class or modify ApplySettings to add custom raw image settings as needed.

Example

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

Best Practices

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