From 68efdf1bfecd679596f4237569c7cc375ab5e515 Mon Sep 17 00:00:00 2001 From: Scriptwonder <1300285021@qq.com> Date: Fri, 25 Jul 2025 02:26:24 -0400 Subject: [PATCH] Clean up comment formatting in GameObjectSerializer --- .../Editor/Helpers/GameObjectSerializer.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/UnityMcpBridge/Editor/Helpers/GameObjectSerializer.cs b/UnityMcpBridge/Editor/Helpers/GameObjectSerializer.cs index 51f6d97..5fc3fce 100644 --- a/UnityMcpBridge/Editor/Helpers/GameObjectSerializer.cs +++ b/UnityMcpBridge/Editor/Helpers/GameObjectSerializer.cs @@ -13,7 +13,7 @@ namespace UnityMcpBridge.Editor.Helpers /// /// Handles serialization of GameObjects and Components for MCP responses. /// Includes reflection helpers and caching for performance. - /// tew + /// public static class GameObjectSerializer { // --- Data Serialization --- @@ -422,7 +422,7 @@ namespace UnityMcpBridge.Editor.Helpers catch (Exception e) { // Catch potential errors during JToken conversion or addition to dictionary - // Debug.LogWarning($"[AddSerializableValue] Error processing value for '{name}' (Type: {type.FullName}): {e.Message}. Skipping."); + Debug.LogWarning($"[AddSerializableValue] Error processing value for '{name}' (Type: {type.FullName}): {e.Message}. Skipping."); } } @@ -505,7 +505,7 @@ namespace UnityMcpBridge.Editor.Helpers // Helper to create JToken using the output serializer private static JToken CreateTokenFromValue(object value, Type type) { - if (value == null) return JValue.CreateNull(); + if (value == null) return JValue.CreateNull(); try { @@ -514,12 +514,12 @@ namespace UnityMcpBridge.Editor.Helpers } catch (JsonSerializationException e) { - // Debug.LogWarning($"[GameObjectSerializer] Newtonsoft.Json Error serializing value of type {type.FullName}: {e.Message}. Skipping property/field."); - return null; // Indicate serialization failure + Debug.LogWarning($"[GameObjectSerializer] Newtonsoft.Json Error serializing value of type {type.FullName}: {e.Message}. Skipping property/field."); + return null; // Indicate serialization failure } catch (Exception e) // Catch other unexpected errors { - // Debug.LogWarning($"[GameObjectSerializer] Unexpected error serializing value of type {type.FullName}: {e}. Skipping property/field."); + Debug.LogWarning($"[GameObjectSerializer] Unexpected error serializing value of type {type.FullName}: {e}. Skipping property/field."); return null; // Indicate serialization failure } }