From f81bd61aa161e2943ba5d7613146b1f6d2aba228 Mon Sep 17 00:00:00 2001 From: Syntriax Date: Wed, 8 Apr 2026 14:24:40 +0300 Subject: [PATCH] fix: yaml serialized messing up string fields --- .../Converters/SerializedClassConverter.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Engine.Integration/Engine.Integration.Yaml/Converters/SerializedClassConverter.cs b/Engine.Integration/Engine.Integration.Yaml/Converters/SerializedClassConverter.cs index 5a970a2..1c3036d 100644 --- a/Engine.Integration/Engine.Integration.Yaml/Converters/SerializedClassConverter.cs +++ b/Engine.Integration/Engine.Integration.Yaml/Converters/SerializedClassConverter.cs @@ -65,14 +65,14 @@ public class SerializedClassConverter : EngineTypeYamlConverterBase publics = []; Dictionary privates = []; - foreach ((string key, object? @object) in serializedClass.Public.Where(v => !v.GetType().HasAttribute())) - if (@object?.GetType().IsClass == false) + foreach ((string key, object? @object) in serializedClass.Public) + if (@object?.GetType().IsClass == false || @object is string) publics.Add(key, @object!); else publics.Add(key, new TypeContainer(@object)); - foreach ((string key, object? @object) in serializedClass.Private.Where(v => !v.GetType().HasAttribute())) - if (@object?.GetType().IsClass == false) + foreach ((string key, object? @object) in serializedClass.Private) + if (@object?.GetType().IsClass == false || @object is string) privates.Add(key, @object!); else privates.Add(key, new TypeContainer(@object));