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