Files
trail-into-darkness/Packages/com.jovian.ingame-logging/Runtime/LogChannel.cs
Sebastian Bularca 31951cfbf8 feat: add channel enable/disable, prefab docs, and UI updates
Add per-channel enable/disable toggle to the in-game logging system
with Enable()/Disable() on InGameLogger and EnableChannel/DisableChannel
on IGameLogStore. Update README with prefab setup guide and enable/disable
documentation. Update character creation and log container prefabs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 14:37:51 +02:00

45 lines
1.3 KiB
C#

using System;
using UnityEngine;
namespace Jovian.InGameLogging {
[Serializable]
public readonly struct LogChannel : IEquatable<LogChannel> {
private readonly string id;
public string Id => id;
public LogChannel(string id) {
this.id = id;
}
public static readonly LogChannel Combat = new("Combat");
public static readonly LogChannel CharacterCreation = new("CharacterCreation");
public static readonly LogChannel World = new("World");
public static readonly LogChannel General = new("General");
public bool Equals(LogChannel other) {
return string.Equals(id, other.id, StringComparison.Ordinal);
}
public override bool Equals(object obj) {
return obj is LogChannel other && Equals(other);
}
public override int GetHashCode() {
return id != null ? id.GetHashCode() : 0;
}
public override string ToString() {
return id ?? string.Empty;
}
public static bool operator ==(LogChannel left, LogChannel right) {
return left.Equals(right);
}
public static bool operator !=(LogChannel left, LogChannel right) {
return !left.Equals(right);
}
}
}