🖨️UI Logger

A singleton UI utility that displays temporary, auto-fading log messages in-game—ideal for debugging, player feedback, or event notifications during fishing (e.g., “Fish nibbled!”, “Fish bitting!”).
🔧 Inspector Settings

References
Log Container The parent
Transformwhere log entries are spawned (should use a layout group for automatic stacking).Log Prefab A
Textprefab used to instantiate each log line. Must be a UITextcomponent.
Fade Settings
Fade In Duration Time (in seconds) for a new log entry to fade in.
Active Time How long the log remains fully visible before fading out.
Fade Out Duration Time (in seconds) for the log to fade out before being destroyed.
💡 Usage
From anywhere in your code, log a message like this:
UILogger.Log("Fish escaped!", "red");
If no color is specified, it uses the prefab’s default text color.
Messages are automatically cleaned up after fading out.
⚠️ Note: Ensure the Log Prefab is a
UnityEngine.UI.Textobject and is disabled in the prefab (it will be activated on spawn).
Last updated