added code from unity

This commit is contained in:
Sebastian Bularca
2026-04-06 20:45:22 +02:00
parent a66b4471fa
commit 2872300873
34 changed files with 2164 additions and 2 deletions

View File

@@ -0,0 +1,15 @@
using System;
using Newtonsoft.Json;
namespace Jovian.InGameLogging {
public sealed class LogChannelJsonConverter : JsonConverter<LogChannel> {
public override void WriteJson(JsonWriter writer, LogChannel value, JsonSerializer serializer) {
writer.WriteValue(value.Id);
}
public override LogChannel ReadJson(JsonReader reader, Type objectType, LogChannel existingValue, bool hasExistingValue, JsonSerializer serializer) {
var id = reader.Value as string;
return new LogChannel(id);
}
}
}